Posted in Javascript onNovember 20, 2008
<a href="#" id="a3" onclick="test()" style="display:none"></a>
<input type="button" value="clck" onclick="test2('a3');"/>
<script language="javascript">
function test()
{
document.location.href = "DBAI_les20_globalization_support.ppt";
}
function test2(name)
{
if(document.all)
{
document.getElementById(name).click();
}
else
{
var evt = document.createEvent("MouseEvents");
evt.initEvent("click", true, true);
document.getElementById(name).dispatchEvent(evt);
}
}
</script>
FireFox与IE 下js兼容触发click事件的代码
声明:登载此文出于传递更多信息之目的,并不意味着赞同其观点或证实其描述。
Reply on: @reply_date@
@reply_contents@