代码如下:
<% @ Language="C#" %>
<html>
<head><title>aaa< % % ></title></head>
<body>
<center>
<%
int i;
for(i=2;i<7;i++)
{
%><font size=<%=i%>>WelCome</font><br>
<% } %>
</center>
</body>
</html>
中的<%符号到底是怎么配对的啊?
<% @ Language="C#" %>
<html>
<head><title>aaa< % % ></title></head>
<body>
<center>
<%
int i;
for(i=2;i<7;i++)
{
%><font size=<%=i%>>WelCome</font><br>
<% } %>
</center>
</body>
</html>
中的<%符号到底是怎么配对的啊?
2 < % % >
3= <%=i%>>
4 <%
^^
int i;
for(i=2;i<7;i++)
{
%><font size=<%=i%>>WelCome</font><br>
<% } %>
^^
5 <% } %>
<html>
二对 <head><title>aaa< % % ></title></head>
<body>
<center>
三对 <%
int i;
for(i=2;i<7;i++)
{
%><font size=<%=i%>>WelCome</font><br>
四对<% } %>
</center>
</body>
</html>
2.<%
int i;
for(i=2;i<7;i++)
{
%>
3.<font size=<%=i%>>WelCome</font>
4.<% } %>
<% } %>这种到底是起的什么作用呢?
int i;
for(i=2;i<7;i++)
{
%>这个里面只有 { 没有 }
要匹配,所以<% } %>