alert不执行
<%//--判断数据库操作成功
if (request.getAttribute( "equalflag ")!=null)--以库平卡并且数据库操作完成
{
request.setAttribute( "equalResultflag ",null);
%>
<script language= "javascript ">
alert( "ok ");//--该句为什么不执行
top.window.frames[ "iframe "].document.getElementById( "cardbanlce ").value= <%=((Long)(request.getSession().getAttribute( "equalAccountMoney "))).longValue()%> ;
<%System.out.println(((Long)(request.getSession().getAttribute( "equalAccountMoney "))).longValue());%>
top.window.frames[ "iframe "].openSerial();//打开串口
top.window.frames[ "iframe "].loadCardPwd();//装载卡密钥
top.window.frames[ "iframe "].writeCard(12);
//如果写卡成功则输出正确信息
if(top.window.frames[ "iframe "].document.getElementById( "wis ").value== "false ")
{ top.window.frames[ "iframe "].closeSerial();
alert( "写卡失败 ! ");
}
top.window.frames[ "iframe "].closeSerial();
( 'frmReg ').action= ' "+contextPath+ "/cardEveryBussiness.car?method=reAdd&flag=0 ' \n ");
//out.println( "document.getElementById( 'frmReg ').submit();}\n ");
top.window.frames[ "iframe "].cardBeep();
<%
String msg=(String)request.getAttribute( "msg ");
if(msg!=null) out.print(msg);
%>
</script>
<%
}%>
为什么alert不执行呢?
------解决方案--------------------因为
<script language= "javascript ">
alert( "ok ");//--该句为什么不执行
中的js已被截断了,
你这么改
<script language= "javascript ">
alert( "ok ");//--该句为什么不执行
</script>