抛出错误但未看到错误

时间:2014-08-27 08:37:59

标签: javascript jquery

我有这样的错误" Uncaught SyntaxError:意外的令牌ILLEGAL"在1030行,但只看这条线。一切都很好:

<input type="text" class="text is_required validate form-control" data-validate="isPostCode"  name="postcode" id="postcode" value="00-000" onblur="$('#postcode').val($(#postcode').val().toUpperCase());" style="width:150px" placeholder="kod pocztowy" />

为什么我会收到此错误?

1 个答案:

答案 0 :(得分:5)

您缺少单引号:

onblur="$('#postcode').val($('#postcode').val().toUpperCase());
//                   here   ^^^