日期:2014-05-16  浏览次数:20520 次

SyntaxError: missing ; before statement
今天上午一直遇到这个问题 ,高手快来解决一下 ! 跪谢
报错SyntaxError: missing ; before statement
         var SearchS-Espece='';


$.post(
    "http://bioweb.supagro.inra.fr/collection_vigne2014/php/searchSimple.php",
     dataString,
     function(data,status){
          $.each(data,function(key, value){
                if(key==="espece"){
                       if(value!=null){
                           if(value.nombreDeResultatPossible===0){
                                var SearchS-Espece='';
                                $('#SearchS-Espece').append(SearchS-Espece);
                           }
                        }
                }
           });
     },
    "json"
);



------解决方案--------------------
SearchS-Espece



减号又不能当作变量