H5 game reception parameters created by COCOS Creator

It’s also my first contact with this stuff. It’s just a personal summary. I hope you don’t mislead you. Welcome to give me some advice.

onLoad: function () {
function GetRequest() {//This function is actually a js method. You can find the source in my blog.
var url = location .search; //Get the string after the "?" character in the url
var theRequest = new Object();
if (url.indexOf("?") != -1) {
var str = url.substr(1);
var strs = str.split("&");
for(var i = 0; i theRequest[strs[i].split("=")[0]] = unescape(strs[i].split("=")[1]);
}
}
return theRequest;
}
var Request = new Object();//The usage is the same as pure js, you can print it if you don’t believe it
Request = GetRequest();
var id=Request["a"];
console.log("wxuser:"+id);

},

Look at the address bar Parameters, and the result printed in the lower right corner.

Magic language, think more Try, there will be results naturally.

It’s also my first contact with this stuff. It’s just a personal summary. I hope you don’t mislead you. Welcome Daniel to give me some advice.

onLoad: function () {
function GetRequest() {//This function is actually a js method. You can find the source in my blog.
var url = location .search; //Get the string after the "?" character in the url
var theRequest = new Object();
if (url.indexOf("?") != -1) {
var str = url.substr(1);
var strs = str.split("&");
for(var i = 0; i theRequest[strs[i].split("=")[0]] = unescape(strs[i].split("=")[1]);
}
}
return theRequest;
}
var Request = new Object();//The usage is the same as pure js, you can print it if you don’t believe it
Request = GetRequest();
var id=Request["a"];
console.log("wxuser:"+id);

},

Look at the address bar The parameters and the result printed in the lower right corner.

Magic language, think more Try, there will be results naturally.

WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 415 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC

Leave a Comment

Your email address will not be published.