Support the query function of the keyboard and simple keyboard, keyboard style completely in the independent CSS file definition, you can beautify themselves.
(Support from the query of the soft keyboard)
(Simple software disk)
Default parameters for Plug-ins
Copy Code code as follows:
Jquery.fn.softkeyboard.defaults = {
Names: {
_DELBTN: "Skbdel",
_CLEARBTN: "Skbclear",
_QUERYBTN: "Skbquery",
_CLOSEBTN: "Skbclose",
_LETTERBTN: "Skbbtn",
_maindiv: "Skbsoftkeyboard",
_leftdiv: "Skbleft",
_rightdiv: "Skbright",
_keyboarddiv: "Skbkeyboard",
_operationdiv: "Skboperation",
_codetxt: "Skbcode",
_resultsselect: "Skbresults",
_postparamcode: "Sfbcode",
_clearbtnviewname: "Clear",
_delbtnviewname: "Delete",
_querybtnviewname: "Query",
_closebtnviewname: "Close"
},//plugin related element naming
Listmultiple:true,//select whether to unfold
Simplekeyboard:true,//whether to display uppercase letters
Onlykeyboard:false,//whether with query function
Maxlength:null,//maximum length to enter
Requestdataurl:null,//Post address of the query data
Oncompleted:function (data) {},//On completion at this time
Onkeydown:function (data) {}//Key when starting this event
};
How to use Plug-ins
How to use
Copy Code code as follows:
<link href= "Softkeyboard.css" rel= "stylesheet" type= "Text/css"/>
<script src= "Jquery-1.6.2.js" type= "Text/javascript" ></script>
<script src= "Jquery.softkeyboard.js" type= "Text/javascript" ></script>
Add a text box to the page use Method 2
<input type= "text" class= "Querytxt"/>
Use plugins for text boxes that are querytxt for class
Copy Code code as follows:
<script type= "Text/javascript" >
$ (". Querytxt"). SoftKeyboard ()
</script>
Change related parameters
Copy Code code as follows:
$ (". Querytxt"). SoftKeyboard ({
Simplekeyboard:true,
Listmultiple:true,
Maxlength:10,
Onkeydown:function (d) {alert (d)},
Requestdataurl: "Getdata.ashx",
Onlykeyboard:true
})
The JSON data format returned by GETDATA.ASHX is similar to the following
Copy Code code as follows:
[{code: DL, Name: "Dalian"},{code: "DT", Name: "Datong"},{code: "DL", Name: "Dali"}]