1.javascript
window.location.href = subPage+"?name=wang,age=18";
2.java
var loc = location.href; var n1 = loc.length;//地址的總長度 var n2 = loc.indexOf("=");//取得=號的位置 var id = decodeURI(loc.substr(n2+1, n1-n2));//從=號後面的內容 console.log(id);