对话框??
<td width= "137 "align= "center " bgcolor= "#FFFFFF "> <%
if(strtemp[0].equals( "0 "))
{
out.println( "关闭 ");
out.println( " <script language= "javascript "> alert( "OK! "); </script> ");
}
else
out.println( "开启 "); %>
</td>
代码如上,希望在满足if条件时弹出一个对话框,但现在结果老认识不了script代码,请问是怎么回事?多谢!
------解决方案-------------------- <td width= "137 "align= "center " bgcolor= "#FFFFFF "> <%
if(strtemp[0].equals( "0 "))
{
out.println( "关闭 ");
out.println( "%> <script language= "javascript "> alert( "OK! "); </script> <% ");
}
else
out.println( "开启 "); %>
</td>
------解决方案--------------------lz修改代码如下:
<td width= "137 "align= "center " bgcolor= "#FFFFFF ">
<%
if(strtemp[0].equals( "0 ")){
out.println( "关闭 ");
out
.println( " <script language=\ "javascript\ "> alert(\ "OK!\ "); </script> ");
} else
out.println( "开启 ");
%>
</td>
------解决方案--------------------应该是lz页面上其他地方有问题。