如题,可以调用以下代码:
//IE
if(navigator.userAgent.indexOf("MSIE")>0){
document.getElementById('tx1').attachEvent("onpropertychange",txChange);
//FF
}else if(navigator.userAgent.indexOf("Firefox")>0){
document.getElementById('tx1').addEventListener("input",txChange2,false);
}