我有一个表单,在用户点击后退的时候重新reset表单
用javscript这样写:window.load=setTimeout(function(){
document.getElementById.myform.reset();
})在IE下,正常,点击后退能reset myform,在firefox下,提示document.getElementById("myform") is null错误
用javscript这样写:window.load=setTimeout(function(){
document.getElementById.myform.reset();
})在IE下,正常,点击后退能reset myform,在firefox下,提示document.getElementById("myform") is null错误
setTimeout(function(){
document.getElementById.myform.reset();
},100)
}
document.getElementById("myform").reset();
},0)这样是有效的。。呵呵,少了个时间值
但是在firefox中无效,挺纳闷