禁止鼠标拖动图片在新窗口打开

<script language="javascript">  
function imgdragstart(){return false;}  
</script>

<script language="javascript">  
for(i in document.images)document.images[i].ondragstart=imgdragstart;  
</script>  


或直接在body写就行了<body ondragstart="return false">

posted on 2015-12-29 11:50  bigdesign  阅读(482)  评论(0编辑  收藏  举报