2016-05-05 24 views
0

我正在嘗試編寫實時搜索程序,但它不工作。下面是我使用在Ajax參數後缺少括號

這個腳本,它返回錯誤:之後參數列表

缺失)

+1

您沒有正確關閉$ .post。 });應該 ); – Gerard

回答

0

缺少括號在POST請求的成功功能

 function Selectcountry(value) { 
    $.post("getRecord.php",{partialstate:value},function(data){ 
     $("#RecordResult").html(data); 
     }); 
} 
+0

現在工作非常感謝 –

1

您在開始之後缺少{功能在$.post之內。

function Selectcountry(value) 
{ 
    $.post("getRecord.php", {partialstate:value}, function(data) 
    { 
     $("#RecordResult").html(data); 
    }); 
} 

如果你一貫的組織你的語法,這些錯誤更容易被發現。