Live2D

获取地址栏参数

function GetUrlParam(paraName) {
var url = document.location.toString();
var arrObj = url.split("?");
if (arrObj.length > 1) {
var arrPara = arrObj[1].split("&");
var arr;
for (var i = 0; i < arrPara.length; i++) {
arr = arrPara[i].split("=");
if (arr != null && arr[0] == paraName) {
return arr[1];
}
}
return "";
}
else {
return "";
}
}
var paraName= GetUrlParam("paraName");
posted @ 2018-11-08 10:05  林夕华  阅读(112)  评论(0编辑  收藏  举报