<%String w="";String s="我";String n="人";int i;for (i=1 ;i<10 ;i++){w=s+"是中国"+n+"\n"+w;}out.print("<script>alert('你好:\n"+w+"');</script>");
%>知道的应该一看就知道我的意图了要怎么改先谢谢了
You may be get some help from the code below.
<% String str="str";%> <script> function accessVar(){ var varStr='<%=str%>'; alert(varStr);// here will diplay 'str' }</script>