asp.net 前台for循环为什么第一个数字不能出现?
前台代码:data:[<%for(inti=0;i<moList.Length;i++)%><%{%>,<%=moList[i]%>,<%}%>]后台代码:publici...
前台代码: data: [ <% for (int i = 0; i < moList.Length; i++) %><%{ %> ,<%=moList[i] %>,<%} %>]
后台代码:
public int[] moList;
protected void Page_Load(object sender, EventArgs e)
{
moList = new int[]{7, 7, 9, 15, 19, 22, 25, 27, 23, 18, 14, 10 };
Response.Write(moList.Length);
}
运行后的结果: 展开
后台代码:
public int[] moList;
protected void Page_Load(object sender, EventArgs e)
{
moList = new int[]{7, 7, 9, 15, 19, 22, 25, 27, 23, 18, 14, 10 };
Response.Write(moList.Length);
}
运行后的结果: 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询