发布网友 发布时间:2022-04-23 23:45
共1个回答
热心网友 时间:2022-05-13 14:02
<form name=form1 onsubmit="return mm()">
<input type=file name=meizz><br/>
<input type=submit value=submit></form>
<SCRIPT LANGUAGE="JavaScript"><!--
function mm()
{
var s = document.form1.meizz.value;
if(s=="")return false;
var img = new Image();
img.src = s;
alert("高 = "+ img.height + "
宽 = "+ img.width);
alert("fileSize = "+ img.fileSize +" 字节");
return(img.fileSize <= 40000);
}
//--></SCRIPT>
1. oncontextmenu="window.event.returnvalue=false" 将彻底屏蔽鼠标右键
<table border oncontextmenu=return(false)><td>no</table> 可用于Table
2. <body onselectstart="return false"> 取消选取、防止复制
3. oncopy="return false;" oncut="return false;" 防止复制