首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > Java Web开发 >

alert不执行,该如何处理

2012-01-19 
alert不执行%//--判断数据库操作成功if(request.getAttribute( equalflag )!null)--以库平卡并且数据

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>

热点排行