the front end uses the $.ajax method of Jquery, and uses the way of jsop to obtain the value of the back end across domains. The backend is built with Node+express, and the value of the backend can be obtained normally. But if the ajax takes the parameter values, the backend will not be able to get the values passed by the front end like the following.
$.ajax({
type: "get",
url: "https://www.gooomi.cn/goods?search_value="+search_value,
dataType: "jsonp",
jsonp: "jsonpCallback",
success:function(res){
console.log(res)
}
})
node is obtained through res.query.search_value
, and an error will be reported.
how should node get the value from jsonp correctly?