页面加载完后执行activx对象?

juzhengli2005 发布于 2013/12/13 15:40
阅读 57
收藏 0

老师:想请教一个问题,html引入activx,如何实现页面加载完后执行activx对象。

以下是先执行完js,然后才加载页面。

我想要的是页面加载完在执行js调用activx对象.

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<meta http-equiv="X-UA-Compatible" content="IE=8">
<title>自助查询系统</title>
<link href="/static/css/pay.css" rel="stylesheet" type="text/css" />
<link href="/static/css/global.css" rel="stylesheet" type="text/css" />
<script src="/static/js/jquery.js" type="text/javascript"></script>
</head>
<body class="bg">
<div class="pay">
<div class="title">您要充值的金额</div>
<div class="balance" id="con">
<div>
<span>本机可以识别<span class=red>10元</span>、<span class=red>20元</span>、<span class=red>50元</span>、<span class=red>100元</span>,请放入纸币</span>
</div>
<div>
<img src="/static/images/money.png"/>
</div>
<span class="prompt">当进钞口为绿灯时,请将纸币平整放入进钞口</span>
</div>
</div>

<OBJECT ID="other_money" CLASSID="CLSID:5E338D66-7E38-4536-97E2-D3FC83A0CA9F" width="0" height="0"></OBJECT>
<script type="text/javascript">
$(document).ready(function(){ 
      ret=document.getElementById("other_money");
  var mon=ret.CashAlidatorDeal(); 
    if(mon){     
       if(mon==32){
      $("#con").html(time_out("读卡器初始化失败!","chaxun.php"));
     }else if(mon==33){
      $("#con").html(time_out("插卡失败!","chaxun.php"));
     }else if(mon==34){
      $("#con").html(error("读取磁道信息失败!"));
     }else if(mon==35){
      $("#con").html(error("读取2磁道信息数据不对!"));
     }else if(mon==31){
      $("#con").html(time_out("打开读卡器COM失败!","chaxun.php"));
     }else{
                  $.ajax({
                      type: "POST",
                      url: "query.php",
                     data: "card=nocard&cardnumber="+cardnumber,
                     success: function(){
     window.location.href="card.php?menu=1&step=2";
      }
      });     
       }
    }
});
</script>
</body>
</html>

加载中
0
juzhengli2005
juzhengli2005
设置success参数,让ajax执行完成在向下执行。
返回顶部
顶部