1

この閉じ括弧はどのように予想外ですか?

function pollCreateOptions_addOption ()
{ // Opening of curly bracket 1
    var highestN = 0;

    $('table#options tr td fieldset').each
    ( // Opening of normal bracket 1
        function (i, option)
        { // Opening of curly bracket 2
            alert (this.attr ('name'));
        { // Closing of curly bracket 2
    ); // Closing of normal bracket 1
} // Closing of curly bracket 1
4

2 に答える 2

1
$('table#options tr td fieldset').each
    ( 
        function (i, option)
        { 
            alert (this.attr ('name'));

        } // not {
    );
于 2012-06-02T14:32:43.730 に答える
1

ここ}では、openning の代わりに closeを使用する必要があります。{{ // Closing of curly bracket 2

function pollCreateOptions_addOption ()
{ // Opening of curly bracket 1
    var highestN = 0;

    $('table#options tr td fieldset').each
    ( // Opening of normal bracket 1
        function (i, option)
        { // Opening of curly bracket 2
            alert (this.attr ('name'));
        } // Closing of curly bracket 2
    ); // Closing of normal bracket 1
} // Closing of curly bracket 1
于 2012-06-02T14:32:57.083 に答える