日期:2014-05-18  浏览次数:20600 次

用open窗口传两个参数,出错
<script   language= "javascript ">
function   hcase()
        {
        var   hidd   =   document.getElementById( "Hidden1 ").value;
        var   lbname   =   document.getElementById( "lbname ").innerText;
        var   MyArgs   =   new   Array(hidd,lbname);
        window.open( "HistoryCaseUI.aspx ",   MyArgs,   'toolbar=no,   menubar=no,   scrollbars=no,   resizable=no,location=no,   status=no ');     //这条出错
        }
</script>


------解决方案--------------------
window.open不是这样传参数的 window.open第二个参数是窗口名称
------解决方案--------------------
第二个参数好像是标题吧。
------解决方案--------------------
1.通过url参数传. 2.通过全局变量. 父窗口中 var aa = "1 " 在子窗口中 window.opener.aa就可
------解决方案--------------------
<script language= "javascript ">
function hcase()
{
var hidd = document.getElementById( "Hidden1 ").value;
var lbname = document.getElementById( "lbname ").innerText;
var MyArgs = new Array(hidd,lbname);
var url = "HistoryCaseUI.aspx?hid= " + hidd + "&lbname= " + lbname;
window.open(url, " ", 'toolbar=no, menubar=no, scrollbars=no, resizable=no,location=no, status=no '); //这条出错
}
</script>
------解决方案--------------------
<script language= "javascript ">
function hcase()
{
var hidd = document.getElementById( "Hidden1 ").value;
var lbname = document.getElementById( "lbname ").innerText;
window.open( "HistoryCaseUI.aspx?hid= " + hidd + "&lbname= " + lbname, " ", 'toolbar=no, menubar=no, scrollbars=no, resizable=no,location=no, status=no ');
}
</script>