<script language="javascript">
function click() {
if (event.button==2) { //button==1为左键
alert('点击查看文章详细内容!')
}
}
document.onmousedown=click
</script>以上在IE里可以正常弹出提示,但在FIREFOX中就无效,有什么办法呢??
function click() {
if (event.button==2) { //button==1为左键
alert('点击查看文章详细内容!')
}
}
document.onmousedown=click
</script>以上在IE里可以正常弹出提示,但在FIREFOX中就无效,有什么办法呢??
function doClick(e) {
e = e || window.event;
debugger;
if (e.button == 2) { //button==1为左键
alert('点击查看文章详细内容!')
}
}
window.onload = function() {
document.body.onmouseup = doClick;
}