请教:我用JRUN,为什么不能用象 <%=msg%>这样的句子呢?是不是还要设置什么呢?
<html>
<head>
<title>Greetings</title>
</head>
<body>
<% for(int i=0;i<5;i++) { %>
<h1>Hello World!</h1>
<% } %>
<% string msg="please";%>
<h1><%=msg%></h1>
<% out.print("hello");%>
</body>
</html>
如果把中间那句 <% string msg="please";%>
<h1><%=msg%></h1>拿掉的话,显示都是正常的。