引发错误,但没有错误
问题描述:
我在1030行有这样的错误“Uncaught SyntaxError:Unexpected token ILLEGAL”,但只看这一行。一切正常:引发错误,但没有错误
<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" />
为什么我得到这个错误?
答
你缺少一个单引号:
onblur="$('#postcode').val($('#postcode').val().toUpperCase());
// here ^^^
+0
谢谢。对不起,愚蠢的问题。 – user3669300 2014-08-27 09:58:42
'一切都是OK'不,不是这样的。通过简单地看问题中的高亮语法,我已经看到了问题。 – 2014-08-27 08:45:55