<% int a = 1;
int b = 2;
if (a<
b
)
{
Response.Write("<script>alert('正确!')</
script
>");
}
%>
<table><tr><td>
<% if(a>0) //随便来的一个条件 %>idc311.com <% else %> 我是www.idc311.com
</td></tr></table>
用 <%内嵌代码%>
比如 :
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>内嵌代码的用法</title>
</head>
<body>
<form id="form1" runat="server">
<%if(DateTime.Now.Hour<12)%>
上午好!
<%else%>
下午好!
</form>
</body>
</html>
相关新闻
- 小程序登录流程图理解 2020-08-18
- 在C#中获取web.config中的配置信息 2021-08-23
- 小程序open-data头像样式 2021-04-10
- 小程序rich-text 富文本解析图片过大和图片路径的问题 2020-11-25
- C#中去掉字符串的最后一个字符 2020-11-23