开发者

Ajax is undefined

开发者 https://www.devze.com 2023-01-17 17:36 出处:网络
This is my code. When I run this I get an error: \"Ajax is undefined\". The error line is highlighted by black letters.

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

精彩评论

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