- js 文件function a(){
- show_modelId += model_id;
- window.open("a.htm?show_modelId="+show_modelId+"",'','height=400,width=800,location=yes');
- } 把show_modelId 的值传递到页面
- a.html
- <input type="text" name="hidden_ID" ID="hidden_ID" style="width: 300px;"/>
- <script>
- //获得参数的方法
- var request =
- {
- QueryString : function(val)
- {
- var uri = window.location.search;
- var re = new RegExp("" +val+ "=([^&?]*)", "ig");
- return ((uri.match(re))?(uri.match(re)[0].substr(val.length+1)):null);
- }
- }
- </script> <script>//调用方法获得参数var modelid = request.QueryString("show_modelId");document.getElementById("hidden_ID").value=modelid;</script>