js 文件function a(){
show_modelId += model_id;
window.open("a.htm?show_modelId="+show_modelId+"",'','height=400,width=800,location=yes');
} 把show_modelId 的值傳遞到頁面 www.aiwalls.com
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>
作者 Heng_Ji