JavaScript 屏蔽右键

<script language="javascript">
function md(e) {
try { if (event.button == 2 || event.button == 3) return false; }
catch (e) { if (e.which == 3) return false; }
}
document.oncontextmenu = function() { return false; }
document.ondragstart = function() { return false; }
document.onmousedown = md;
</script>
posted on 2010-03-01 14:24  草原和大树  阅读(301)  评论(0编辑  收藏  举报