<body>
<object ID="CardReader" CLASSID= ""
CODEBASE="" width=0 height=0></object>
</body>
<li>卡号:<input id="cardid" name="cardid" ></li>
var axCardReader = document.getElementById('CardReader');
if(axCardReader == null){
alert("创建组件失败")
}else{
axCardReader.AXRCC_Open();
var cardid = axCardReader.AXRCC_readCardID();
document.getElementById('cardid').value = cardid;
axCardReader.AXRCC_Close();
}