javascript - jQuery Syntax Error - Stack Overflow

$(document).ready(function(){$("#input_6_4\.3_label").html("CityBorough");$("

$(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.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1742354039a4428082.html

相关推荐

  • javascript - jQuery Syntax Error - Stack Overflow

    $(document).ready(function(){$("#input_6_4\.3_label").html("CityBorough");$("

    6小时前
    20

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信