Expected an identifier and instead saw '"' . Missing ";" before statement.
What's the matter ?
Finally found it's not related to any ";" as the error message mentioned.
The reason is I have used some wrong syntax,
I marked at the image as below:
This is a part of my code,
I made syntax which caused error in red.
So I highlight them in yellow:
case "remove":For my case, change the . to + can fix the error
case "remove1":
searchquery = prequery+'"'.encodeURIComponent($('#remove').val())+'"+-"'+encodeURIComponent($('remove1').val()).'"';
$('#search_query').html(searchquery.replace(/%20/g, '+'));
break;
case "and":
searchquery = prequery+'"'.encodeURIComponent($('#and').val())+'"+%2"'+encodeURIComponent($('and1').val()).'"';
$('#search_query').html(searchquery.replace(/%20/g, '+'));
break;
case "remove":
case "remove1":
searchquery = prequery+'"'.encodeURIComponent($('#remove').val())+'"+-"'+encodeURIComponent($('remove1').val())+'"';
$('#search_query').html(searchquery.replace(/%20/g, '+'));
break;
case "and":
searchquery = prequery+'"'.encodeURIComponent($('#and').val())+'"+%2"'+encodeURIComponent($('and1').val())+'"';
$('#search_query').html(searchquery.replace(/%20/g, '+'));
break;
=======================================
No comments :
Post a Comment