1.
input 中可以设置 maxLength 属性,控制输入的文字数量,中英文字节数一样,但是没有验证兼容性
2.客户端中的页面禁止右键,复制等
<body scroll="no" oncontextmenu='return false' ondragstart='return false' onselectstart ='return false' onselect='return false' oncopy='return false' onbeforecopy='return false' onmouseup='return false'>
<script type="text/javascript">
//F5
document.documentElement.onkeydown=function(e){
e=e||window.event;
if(e.keyCode==){
if(e.returnValue){
e.returnValue=false;
}else{
if(e.preventDefault){
e.preventDefault();
}else if(e.stopPropagation){
e.stopPropagation();
}else{
window.event.cancelBubble = true;
}
}
return false;
}
}
//右键
document.documentElement.oncontextmenu=function(e){
e=e||window.event;
e.cancelBubble = true;
e.returnValue=false;
return false;
}
</script>