<div class="htmlarea"> <textarea id="runcode14214"> <script> function request(key) { if(typeof(this)=="undefined")return false; if(this.length>0) { var s = this.split("&"); for(var i in s) { var sp=s[i].split("=") if(sp[0]==key)return(sp[1]); } return false; } else return false } function getAllKey() { if(typeof(this)=="undefined")return false; var arr=new Array; if(this.length>0) { var s = this.split("&"); for(var i in s) { var sp=s[i].split("="); arr.push(sp[0]); } return arr; } else return false } String.prototype.request=request String.prototype.getAllKey=getAllKey //=================================================== var url=location.search.substr(1) //action=reply&forum=3&topic=1469 var arg=url.getAllKey() alert(arg) document.write("提交参数:"+arg) for(var cou in arg ) document.write(" 参数"+arg[cou]+"的值为:"+url.request(arg[cou])+" ") </script> </textarea><br><input onclick="runEx('runcode14214')" type="button" value="运行代码"> <input onclick="doCopy('runcode14214')" type="button" value="复制代码"> <input onclick="doSave(runcode14214)" type="button" value="保存代码">[Ctrl+A 全选 注:<a href="http://www.jb51.net/article/23421.htm" title="查看具体详情" target="_blank">如需引入外部Js需刷新才能执行</a>]</div>