请问javascript中可以插入JSP的语句吗?<% %>
请问javascript中可以插入JSP的语句吗? <% %>
<script language= "javascript " >
<!--
function chek()
{
if(form.name.value== " ")
{
<% out.print( "ffffff ");%>
}
else if(form.psw.value== " ")
{
<% out.print( "aaaaaaaaaa ");%>
}
}
------解决方案--------------------呵呵,如果你是要显示出来的,那么像你上面这样就不行了,应该
function chek()
{
if(form.name.value== " ")
{
document.write( " <% out.print( 'ffffff ');%> ");
}
else if(form.psw.value== " ")
{
document.write( " <% out.print( 'aaaaaaaaa ');%> ");
}
}