<script src= "Js/jquery-1.4.2.js" ></script>
<script src= "Js/jquery.ui.core.js" ></script>
<script src= "Js/jquery.ui.position.js" ></ script>
<script src= "js/jquery.ui.widget.js" ></script>
<script src= "js/ Jquery.ui.autocomplete.js "></script>
<link href=" Themes/excite-bike/jquery-ui-1.9.0.custom.css " rel= "stylesheet"/>
<script type= "Text/javascript" >
The accompanying resource bundle, please go to my resources page to download.
Please note that the ashx file is to be placed in the Jquerycomplete directory//import order as the same as the article $ (document). Ready (function () {$.ajax (
{type: ' post ', url: ' Keyvaluehandler.ashx ', DataType: "Text", success:function (data) {Parray = $.parsejs
On (data);
}, Complete:function () {$ ("#txtCitys"). AutoComplete ({
Source:parray, Select:function (event, UI) {
$ ("#txtCitys"). Val (Ui.item.value);
$ ("#txtCitys"). Val (Ui.item.label);
Event.preventdefault ();
}
}); $ ("#txtCitys"). Data ("AutoComplete"). _renderitem = function (uL, Item) {return $ ("<li></li>"). Data ("ITEM.A Utocomplete ", Item). Append (" <a><table style= ' width:300; ") > <tr> <td align= ' left ' > ' + Item.label + ' </td> <td align= ' right ' style= ' Color:green '
> "+ item.value + </td> </tr> </table></a>"). APPENDTO (UL);
};
}
});
}); </script> <body> <input type= "text" id= "Txtcitys"/> </body>