Code
1
<
script
type
="text/javascript"
language
="javascript"
>
2 $(document).ready(
3 function () {
4 $( ' #<%=TxtAccount.ClientID %> ' ).autocomplete( ' AccountAutocompleteHelper.ashx '
5 ,
6 {
7 extraParams: { code: " 1234 " , serial : " ABCD " },
8 delay: 10 ,
9 minChars: 1
10 });
11 });
12
13 </ script >
2 $(document).ready(
3 function () {
4 $( ' #<%=TxtAccount.ClientID %> ' ).autocomplete( ' AccountAutocompleteHelper.ashx '
5 ,
6 {
7 extraParams: { code: " 1234 " , serial : " ABCD " },
8 delay: 10 ,
9 minChars: 1
10 });
11 });
12
13 </ script >
十分簡單,加個 extraParams 即可
使用 json 式語法標記參數
可以觀察 QueryString 及 RawUrl 觀察送出的parameters
不過jQuery版本進展快
要實在不行,就直接在目標url (ex.AccountAutocompleteHelper.ashx?param=value)後帶參數