+文本框只允许输入英文、数字和下划线:
<input onkeypress="return !String.fromCharCode(event.keyCode).match(/W/)" onpaste="return !clipboardData.getData('text').match(/W/)" style="ime-mode:Disabled" ondragenter="return false">
粘贴前过滤字符
<input name="lc" id="lc" value="" size="2" maxlength="3" type="text" class="txt2" onkeyup="value=value.replace(/[^d]/g,'') "onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^d]/g,''))" /> |
|
||
相关热词搜索: |
||
收藏到网摘: | ||
|