代码如下:
<% @ 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>
中的<%符号到底是怎么配对的啊?

解决方案 »

  1.   

    1<% @ Language="C#" %>
    2 < % % >
    3= <%=i%>>
    4 <%
      ^^ 
    int i;
    for(i=2;i<7;i++)
    {
    %><font size=<%=i%>>WelCome</font><br>
    <%  } %>
          ^^
    5 <%  } %>
      

  2.   

    一对 <% @ 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>
      

  3.   

    1.<head><title>aaa< % % ></title></head>
    2.<% 
    int i;
    for(i=2;i<7;i++)
    {
    %>
    3.<font size=<%=i%>>WelCome</font>
    4.<%  } %>
      

  4.   

    我初学中,所以问题多。
    <%  } %>这种到底是起的什么作用呢?
      

  5.   

    <% %>表示它是在服务器端执行的代码。
      

  6.   

    <% 
    int i;
    for(i=2;i<7;i++)
    {
    %>这个里面只有 {  没有 }
    要匹配,所以<%  } %>
      

  7.   

    反正<%%>包含的代码和ASP都有关系。