input 禁止输入法

<INPUT TYPE = text STYLE = "ime-mode:disabled" > 即可禁止输入法
js形式:

active 代表输入法为中文
inactive 代表输入法为英文
auto 代表打开输入法 (默认)
disable 代表关闭输入法

<INPUT onfocus=" this.style.imeMode='active' " />

<INPUT onfocus=" this.style.imeMode='inactive' " />

<INPUT onfocus=" this.style.imeMode='auto' " />

<INPUT onfocus=" this.style.imeMode='disabled' " />

禁止input 粘贴:

<input id=VC class="xinput" maxlength=4 size="5" onkeydown="fnKeyDown(event);" onfocus="this.select()" onclick="this.select()" onpaste="return false" ondrop="return false" ondragenter="return false;" ondragstart="return false" onkeypress="return keyDigt(event)" value="" />

ondragstart="return false" 禁止鼠标在网页上拖动

ondragenter 当用户拖曳对象到一个合法拖曳目标时在目标元素上触发

onpaste="return false" 禁止粘贴

posted @ 2014-08-15 11:33  webnote  阅读(1713)  评论(0编辑  收藏  举报