开发者

Ajax is undefined

This is my code. When I run this I get an error: "Ajax is undefined". The error line is highlighted by black letters.

function funGetName()
开发者_高级运维{
    var id=document.getElementById("Cust_Id").value;
    var URL="Default.aspx?TODO=getName&custId="+id;
    alert(id);
    var ajax=new Ajax.Request(URL,
    {
        method:'get'
    });
}


Try putting the opening brace on the same line, after URL,. It may be a semicolon insertion problem.

i.e.:

var ajax=new Ajax.Request(URL, {
    method:'get'
});
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜