var name,value; var str=location.href; //取得整个地址栏 var num=str.indexOf("#") str=str.substr(num+1); //取得所有参数 alert(str);