代码语言:javascript复制
http://localhost:62683/youli/product.htm#0
alert(GetRequest());
//获取#号值
function GetRequest() {
var str = location.href
var num = str.indexOf("#");
str = str.substr(num 1);
return str;
}