admin管理员组

文章数量:1333451

$(document).ready(function(){
    $("#input_6_4\\.3_label").html("City/Borough");
    $("#input_6_8\\.3_label").html("City/Borough");

    $("#gform_next_button_6_42").click(function(){
        alert("hi");

    )};
});

Firebug keeps spitting out a syntax error with the above code with the offender being these characters:

)};

Any ideas at what's wrong because the code seems good to me?

$(document).ready(function(){
    $("#input_6_4\\.3_label").html("City/Borough");
    $("#input_6_8\\.3_label").html("City/Borough");

    $("#gform_next_button_6_42").click(function(){
        alert("hi");

    )};
});

Firebug keeps spitting out a syntax error with the above code with the offender being these characters:

)};

Any ideas at what's wrong because the code seems good to me?

Share Improve this question edited Aug 22, 2011 at 7:21 Brock Adams 93.7k23 gold badges241 silver badges305 bronze badges asked Aug 22, 2011 at 7:17 shahmeer navidshahmeer navid 2351 gold badge5 silver badges11 bronze badges 2
  • Hmm. Someone seems to be wanting to silently make a point. I think you received a down-vote for not phrasing the title as a question... – Tieson T. Commented Aug 22, 2011 at 7:22
  • Also, if PaulPRO answered your question, don't forget to mark it as so. – Tieson T. Commented Aug 22, 2011 at 7:23
Add a ment  | 

2 Answers 2

Reset to default 7

They are in the wrong order:

)};

Should be:

});

it should be });, you close your arguments list before closing the function body.

本文标签: javascriptjQuery Syntax ErrorStack Overflow