在javascript中window.open窗口属性参数的传入问题

来源:百度知道 编辑:UC知道 时间:2024/06/20 14:47:40
我想实现一个这样的函数,就是在新打开的窗口中,通过复选框控制其窗口的各个属性的状况,然后将其参数传入到window.open里面,哪位大侠能指教一下啊?不慎感激!!!
html的body部分已省去。
function openwin() {
var h; if(document.form1.status1.checked=="checked") h="yes";
var m=document.form1.url.value;
var d; if(document.form1.menubar1.checked=="checked") d="yes";
var e; if(document.form1.scrollbar1.checked=="checked") e="yes";
var j; if(document.form1.directories1.checked=="checked") j="yes";
var c; if(document.form1.toolbar1.checked=="checked") c="yes";
var f;
if(document.form1.resizable1.checked=="checked")
{f="yes";
a=parseInt(document.form1.height1.value);
b=parseInt(document.form1.width1.value);
}

var window1=window.open ("http://"+m, null, "toolbar="+c+",menubar="+d+",scrollbars="+e+",resizable="+f+",location=&

onclick="javascript:window.open(this.href + '&参数名=参数&参数名=参数'width=950,height=650,resizable=yes,scrollbars=yes')
..........................................................
或者:动态参数

onclick="javascript:window.open(this.href + '&动态参数名=' + document.动态参数.value 'width=950,height=650,resizable=yes,scrollbars=yes')

用自己的参数替换语句中的中文位置