2013-03-02 4 views
-2

나는 중복을 읽고 .I 그냥 내 종료 태그 앞에하지만 나는 다음과 같은 오류가 발생하고이 스크립트를 퍼트 한새로운 catch되지 않은 구문 오류 : 불법 예기치 않은 토큰은

Uncaught Syntax error: Unexpected token ILLEGAL

<script type="text/javascript"> 
    $(document).ready(function() { // here is the error 
    $(#search).keypress(function(e) { 
     if(e.which == 13) { 
      myFunction(); 
     } 
    }); 
    $("#status").hide(); 
    alert("hide on load "); 
    $("#more").hide(); 
    }); 
    </script> 

답변

0
$(#search).keypress(function(e) { 

$("#search").keypress(function(e) { 
0

jQuery 선택기 주변에 인용 부호가 누락 되었기 때문에 ...

$("#search").keypress(function(e) { 
    //... 
} 
0

그것은 따옴표로 교체 $(#search).

와 문제처럼 보인다 $('#search').

관련 문제