一个转义问题急!
<script language= "javascript ">
alert( "没有提供手机号码或者号码错误 ");
location.href= "1.jsp ";
</script>
我要把这段代码通过out.print()打印出来,别且被HTML解析执行
请问这里我用的是:
<%
String return_msg = " <script language=\ "javascript\ "> "
+ "alert(\ "没有提供手机号码或者号码错误\ "); "
+ "location.href=\ "first_yy1.jsp?phone=\ "+phone+\ "&spid=\ "+spid+\ "&subspid=\ "+subspid\ "; "
+ " </script> ";
out.println(return_msg);
%>
为什么功能无法实现,什么都没有,急
------解决方案-------------------- <%
" <script language= 'javascript '> "
"alert( '没有提供手机号码或者号码错误 '); "
"location.href= '1.jsp '; "
" </script> "
%>