Edit modified or new page linkage can be written like this
JQuery (function () {///provincial $ (' #province '). ComboBox ({valuefield: ' itemvalue ',//Value field TextField: ' Itemtext ',//Field displayed U RL: '/user/sort/province_list ', panelheight: ' Auto ', required:true, editable:true,//not editable, only select value: ' ${user.prov Ince} ', Onchange:function (province) {//$ (' #city '). ComboBox (' Clear '); $ (' #city '). ComboBox ({valuefield: ' itemvalue ',//Value field TextField: ' Itemtext ',//field URL displayed: '/user/sort/city_list?provi Nce= ' +province, panelheight: ' Auto ', required:true, editable:true,//not editable, only select value: '--Please select--'} '; });//County City $ (' #city '). ComboBox ({valuefield: ' itemvalue ',//Value field TextField: ' Itemtext ',//Field URL: '/user/sort/cit Y_list?province=${user.province} ', Panelheight: ' Auto ', required:true, editable:true,//not editable, only select value: ' ${user. City}); /Forms table <tr> <td align= "right" > Area Provincial </td> <td align= "left" > <input type= "text" id= "province" Name= "province" style= "width: 128px " class=" Easyui-validatebox "validtype=" selectvalid["--Please Choose--" "/> </td> </tr> < tr> <td align= "right" > area County City </td> <td align= "left" > <input type= "text" id= "City" Name= "City" style= " width:128px " &nBsp class= "Easyui-validatebox" validtype= "selectvalid["---Please choose--'] "/> </td> </tr>
The view page can be written like this
JQuery (function () {///provincial $ (' #province '). ComboBox ({valuefield: ' itemvalue ',//Value field TextField: ' Itemtext ',//Field displayed U RL: '/user/sort/province_list ', panelheight: ' Auto ', required:true, editable:false,//not editable, only select value: ' ${user.pro Vince});//County City $ (' #city '). ComboBox ({valuefield: ' itemvalue ',//Value field TextField: ' Itemtext ',//field URL displayed: '/user/so Rt/city_list?province=${user.province} ', Panelheight: ' Auto ', required:true, editable:false,//not editable, only select value: ' ${user.city}); /Forms table <tr> <td align= "right" > Regional </td> <td align= "left" > <input type= "text" id= "province "Name=" province " class= "Easyui-validatebox"Validtype= "selectvalid["---Please choose--'] "disabled=" disabled "/> </td> </tr> < tr> <td align= "right" > area County City </td> <td align= "left" > <input type= "text" id= "City" Name= "City" class= " Easyui-validatebox "validtype=" selectvalid["--Please Choose--" "disabled=" disabled "/> </td> </tr>
The above code is learning Easyui, side summary, if there are shortcomings, please understand!
Note: When linkage, it is best to set the width of the combo box, because I do not set the width of the time, the provincial linkage city, the city combo box width will be shorter and smaller, set the width
Style= "width:128px"
It's settled! I hope this brings us some help!