Front desk:
HTML page
<input id= "Clsydw" name= "Clsydw" class= "Easyui-combobox" data-options= ""/>
Js
/Auto Complement $ ("#clsydw"). ComboBox ({valuefield: ' Syr ', TextField: ' Syr ',
panelwidth:200, Panelheight: ' Auto ', onchange:function (values,o) {if (values!= "") {
var url= ' ${localctx}/workloadpmtreport/querysyr.do?syr= ' +values.trim ();
$ ("#clsydw"). ComboBox ("Reload", url); The background section is the focus, because in the acceptance of SYR parameters, is garbled, here using a variety of decoding is not possible, only use the following decoding method (there may be a better way, not currently found)/** according to the name of the unit automatically complement the full unit of the full term * @param REQ * @return * * * @RequestMapping (value= "querysyr.do") @ResponseBody public list<veh_hy> Querylistsy
R (HttpServletRequest req) {String syr= "";
try {syr=new string (new String (Req.getparameter ("Syr"). GetBytes ("Iso-8859-1"), "UTF-8");
catch (Unsupportedencodingexception e) {e.printstacktrace (); } syr= (syr!= "")?
% ' +syr.trim () + '% ': ";
Return Vehhymapper.getlistbysyr (SYR); }
The above Easyui-combobox implementation of simple automatic completion of the full function of the example is a small series to share all the content, I hope to give you a reference, but also hope that we support the cloud-dwelling community.