Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/83.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Jquery Codekit Uglify.js';意外标记punc';错误_Jquery_Syntax Error_Uglifyjs_Codekit - Fatal编程技术网

Jquery Codekit Uglify.js';意外标记punc';错误

Jquery Codekit Uglify.js';意外标记punc';错误,jquery,syntax-error,uglifyjs,codekit,Jquery,Syntax Error,Uglifyjs,Codekit,我不确定我的语法/意外标记错误在哪里 我在JSFIDLE上的完整jQuery函数: 我得到的错误是: The following error information applies to that file: 'Unexpected token punc, expected punc', line: 160, col: 29, pos: 5212, 它对应于带有catch{ 您注意到错误的原因了吗? 职能: //REGISTER var wireRegisterForm

我不确定我的语法/意外标记错误在哪里

我在JSFIDLE上的完整jQuery函数:


我得到的错误是:

The following error information applies to that file: 

 'Unexpected token punc, expected punc',
  line: 160,
  col: 29,
  pos: 5212,

它对应于带有catch{

您注意到错误的原因了吗?



职能:

//REGISTER
var wireRegisterForm = function (form) {

console.log('inside wireRegisterForm');
var $form = $(form);

//form being submitted
$form.find('button').unbind('click').bind('click', function () {
    if (WORLD.validation.validateRegisterForm($form)) {

        var params = {
            "email":$form.find('#register-email').val(),
            "firstName":$form.find('#register-firstname').val(),
            "lastName":$form.find('#register-lastname').val(),
            "password":$form.find('#register-password').val()
        };

        //fill params with parameters from form
        WORLD.networking.postToServerWithAjax('/login', params, function (response) {

            //check successful or not from response object
            try {
                var isSuccessful = response.wassuccessful;
                if (isSuccessful === true) {
                    loginSuccess();
                } else {
                    // login failed
                }
            } catch {
                // login failed
            }

        });

        }

        //stop the form submit
        return false;
    });

    //enter clicked from password box
    $form.find("input[name='password']").unbind('keyup').bind('keyup', function (event) {
        if (event.keyCode === 13) {
            this.find("button").click();
        }
    });
};

错误在于我的catch语句错误……这是编写javascript捕获的正确方法:

catch(err)