%=内容% >使用

这是客户端代码与服务器代码混合使用。
<%= %>中,在<% %> 之间的是服务器端代码,外面的是客户端代码。
若前面有个=,则是直接引用服务器代码中的值。
如:
<%string a = "a string";%>
那么下面这样引用 
<input type="text" value="<%=a %>" />
在客户端就能看到 
<input type="text" value="a string" />

猜你喜欢

转载自blog.csdn.net/qq_33459369/article/details/81147870