002. 在HTML页面嵌入循环代码


 1 <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" %>
 2 
 3 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 4 
 5 <html xmlns="http://www.w3.org/1999/xhtml">
 6 <head runat="server">
 7      <title>HTML服务器控件</title>
 8     
 9 </head>
10 <body>
11     <form id="form1" runat="server">
12     <div>
13     <%for (int i = 1;i < 7;i++) %>
14     <%{%>
15     <font size=<%= i+1%>>Hello World!</font></br>
16     <%}%>
17 
18     </div>
19     </form>
20 </body>
21 </html>

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM