禁止输入法
形式:
参数说明形式:
active 代表输入法为中文
inactive 代表输入法为英文
auto 代表打开输入法 (默认)
disable 代表关闭输入法
具体例子如下:
禁止input 粘贴
具体例子如下:
οnclick="this.select()" οnpaste="return false" οndrοp="return false" οndragenter="return false;"
οndragstart="return false" οnkeypress="return keyDigt(event)" value=""/>
参数说明:
οndragstart=”return false” 禁止鼠标在网页上拖动
ondragenter 当用户拖曳对象到一个合法拖曳目标时在目标元素上触发
οnpaste=”return false” 禁止粘贴
其他方法
方法一:
在ie可以完全屏蔽input 输入,但firefox上面去掉了光标,还是可以输入字符
方法二:
用checkbox控制…..
function ischeck(){
var ischeck=document.form1.iswrite.checked;
var isshow=document.getElementById("show");
if (ischeck==true){
isshow.disabled="";
}else{
isshow.disabled="disabled";
}
}
HTML
自定义输入https://www.cnblogs.com/mingforyou/category/326335.html