All in all: First enter onkeyup= "Value=value.replace (/[^\x]/g,") in <input> and then X in (/[\x]/g, ") to the code you want to enter, Chinese u4e00-u9fa5 , number 0-9, English a-z\a-z, other symbols @, dots, or other symbols. can also be multiple, with \ Separated on the line.
For example: Chinese and English + digit + @ sign + dot symbol \a-\z\a-\z0-9\u4e00-\u9fa5\@\.
If you want to not right-click the popup menu in the text box and cannot paste in the copied information
Enter onpaste= "return false" oncontextmenu= "return false" in <input>. "
JS control text box can only enter numbers
<input onkeyup= "Value=value.replace (/[^0-9]/g, ')" onpaste= "Value=value.replace (/[^0-9]/g, ')" OnContextMenu = " Value=value.replace (/[^0-9]/g, ') ">
JS control text box can only enter a number, a decimal point
<input onkeyup= "Value=value.replace (/[^\0-9\.) /g, "onpaste=" Value=value.replace (/[^\0-9\.) /g, ') "OnContextMenu =" value=value.replace (/[^\0-9\.) /g, ') ' >
JS control text box can only be entered in English
<input onkeyup= "Value=value.replace (/[^\a-\z\a-\z]/g, ')" onpaste= "Value=value.replace (/[^\a-\z\A-\Z]/g, ')" OnContextMenu = "Value=value.replace (/[^\a-\z\a-\z]/g, ')" >
JS control text box can only input English, digital
<input onkeyup= "Value=value.replace (/[^\a-\z\a-\z0-9]/g, ')" onpaste= "Value=value.replace (/[^\a-\z\A-\Z0-9]/g , ') "OnContextMenu =" value=value.replace (/[^\a-\z\a-\z0-9]/g, ') ">
JS control text box can only input Chinese
<input onkeyup= "Value=value.replace (/[^\u4e00-\u9fa5]/g, ')" onpaste= "Value=value.replace (/[^\u4E00-\u9FA5]/g , ') "OnContextMenu =" value=value.replace (/[^\u4e00-\u9fa5]/g, ') ">
JS control text box can only input Chinese, English, digital
<input onkeyup= "Value=value.replace (/[^\a-\z\a-\z0-9\u4e00-\u9fa5]/g, ')" onpaste= "Value=value.replace (/[^\a- \z\a-\z0-9\u4e00-\u9fa5]/g, ') "OnContextMenu =" value=value.replace (/[^\a-\z\a-\z0-9\u4e00-\u9fa5]/g, ') ">
JS control text box can only input Chinese, English, numbers, spaces
<input onkeyup= "Value=value.replace (/[^\a-\z\a-\z0-9\u4e00-\u9fa5\]/g, ')" onpaste= "Value=value.replace (/[^\ A-\z\a-\z0-9\u4e00-\u9fa5\]/g, ') "OnContextMenu =" Value=value.replace (/[^\a-\z\a-\z0-9\u4e00-\u9fa5\]/g, ') " >
JS control text box can only input Chinese, English, digits, decimal point
<input onkeyup= "Value=value.replace (/[^\a-\z\a-\z0-9\u4e00-\u9fa5\.) /g, "onpaste=" Value=value.replace (/[^\a-\z\a-\z0-9\u4e00-\u9fa5\.) /g, ') "OnContextMenu =" value=value.replace (/[^\a-\z\a-\z0-9\u4e00-\u9fa5\.) /g, ') ' >
There are three ways to bind events in jquery: Take the Click event as an example
(1) Target.click (function () {});
(2) Target.bind ("Click", Function () {});
(3) target.live ("Click", Function () {});
To the mall, tag, time connection binding event
function bindclicklive () {
$ (". Find_tag a"). Live ("Click", Function () {
Paramclick (Null,this,null);
});
$ (". Ch_mallclass a"). Live ("Click", Function () {
Paramclick (this);
});
$ (". Ch_havechild span A"). Live ("Click", Function () {
Paramclick (Null,null,this);
});
}
JS control text box can only input Chinese, English, digital, etc.