html禁用鼠标右键的问题 帮忙看下下面的代码哪错了 不能运行
<SCRIPTlanguage=JavaScript><!--file://锁鼠标右键和键盘CONTEXTMENU键functionclick(e){if(documen...
<SCRIPT language=JavaScript>
<!--
file://锁鼠标右键和键盘CONTEXTMENU键
function click(e) {
if (document.all) {
if (event.button==2||event.button==3) { alert("..");
oncontextmenu='return false';
}
}
if (document.layers) {
if (e.which == 3) {
oncontextmenu='return false';
}
}
if (document.layers) {
document.captureEvents(Event.MOUSEDOWN);
}
document.onmousedown=click;
document.oncontextmenu = new Function("return false;")
// -->
</SCRIPT> </body></html> 展开
<!--
file://锁鼠标右键和键盘CONTEXTMENU键
function click(e) {
if (document.all) {
if (event.button==2||event.button==3) { alert("..");
oncontextmenu='return false';
}
}
if (document.layers) {
if (e.which == 3) {
oncontextmenu='return false';
}
}
if (document.layers) {
document.captureEvents(Event.MOUSEDOWN);
}
document.onmousedown=click;
document.oncontextmenu = new Function("return false;")
// -->
</SCRIPT> </body></html> 展开
2013-12-21
展开全部
<SCRIPT language=JavaScript>
function click(e) {
if (document.all) {
if (event.button==2||event.button==3) {
oncontextmenu=\'return false\';
}
}
if (document.layers) {
if (e.which == 3) {
oncontextmenu=\'return false\';
}
}
}
if (document.layers) {
document.captureEvents(Event.MOUSEDOWN);
}
document.onmousedown=click;
document.oncontextmenu = new Function("return false;")
</SCRIPT>
function click(e) {
if (document.all) {
if (event.button==2||event.button==3) {
oncontextmenu=\'return false\';
}
}
if (document.layers) {
if (e.which == 3) {
oncontextmenu=\'return false\';
}
}
}
if (document.layers) {
document.captureEvents(Event.MOUSEDOWN);
}
document.onmousedown=click;
document.oncontextmenu = new Function("return false;")
</SCRIPT>
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
2013-12-21
展开全部
你那少了个花括号!
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询