我正在尝试编写实时搜索程序,但它无法正常工作。这是我正在使用的脚本
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);
});
}
如果您一致地组织语法,则更容易发现这些错误。
答案 1 :(得分:0)
在帖子请求的成功功能中缺少大括号
function Selectcountry(value) {
$.post("getRecord.php",{partialstate:value},function(data){
$("#RecordResult").html(data);
});
}