js在firefox出错,在firefox中不能自动点击
<a id='aRefer' href='http://www.' target='_self'>网易</a><script language='javascript'>
if(navigator.userAgent.indexOf("MSIE")>0){
document.getElementById('aRefer').click();
}else{
var a=document.createEvent("MouseEvents");
a.initEvent("click", true, true);
document.getElementById('aRefer').dispatchEvent(a);
}
</script>