118 js Uncaught ReferenceError: Invalid left-hand side in assignment

2253 단어 js
You can't assign a new value to the result of a function
$('input#q').val() = urlencode($('input#q').val());

Use this instead:
$('input#q').val(urlencode($('input#q').val()))

It wouldn't work with the keypress either - maybe the page is simply submitted after the same js error occurs.

좋은 웹페이지 즐겨찾기