[]读URL parameter
https://www.hello.com?index=helloJane
读URL parameter
例如:
https://www.hello.com?index=helloJane
把“helloJane”放进页面的text 请问这个怎么做呢?
好像这样, 这个window.location.href 在LayaAirIDE 怎么写呢?
var url = window.location.href;
var index = null;
if(url.lastIndexOf('?') != -1) {
index = url.split('?')[1];
index= index.split('=')[1];
}
读URL parameter
例如:
https://www.hello.com?index=helloJane
把“helloJane”放进页面的text 请问这个怎么做呢?
好像这样, 这个window.location.href 在LayaAirIDE 怎么写呢?
var url = window.location.href;
var index = null;
if(url.lastIndexOf('?') != -1) {
index = url.split('?')[1];
index= index.split('=')[1];
}
没有找到相关结果
已邀请:
要回复问题请先登录
2 个回复
Aar0n
赞同来自:
sheen
赞同来自: