当前位置:首页 > 开发 > Web前端 > JavaScript > 正文

JS-showMoalDialog传参

发表于: 2013-05-15   作者:diarbao   来源:转载   浏览:
摘要: function openWindow(driverName,id,dayOff,holidayType,sex){ var driver = new Object(); driver.id=id; driver.sex=sex; driver.driverName=driverName; driver.dayOff=dayOff; dr
function openWindow(driverName,id,dayOff,holidayType,sex){
    var driver = new Object();
    driver.id=id;
    driver.sex=sex;
    driver.driverName=driverName;
    driver.dayOff=dayOff;
    driver.holidayType=holidayType;
    window.showModalDialog(
    "main_company/sch.jsp",
    driver,
    "dialogWidth=750px;dialogHeight=150px;center=yes;border=thick;status=no;help=no;scrollbars=yes"
    );
    //window.open ('main_company/sch.jsp?driverid='+id+"&holidayType="+holidayType+"&dayOff="+dayOff, 'newwindow', 'height=100, width=700, top=300, left=500, toolbar=no, menubar=no, scrollbars=no,resizable=yes,location=no, status=no') 
}

 第2个页面接收参数
var driver = window.dialogArguments;
                //alert("id is"+obj.id);
                //alert("dayOff is "+obj.dayOff);
                //alert("holidayType is "+obj.holidayType);
                document.getElementById("driverName").innerText ='司机姓名:' +driver.driverName;
                document.getElementById("sex").innerText ='性别:' +driver.sex;

JS-showMoalDialog传参

  • 0

    开心

    开心

  • 0

    板砖

    板砖

  • 0

    感动

    感动

  • 0

    有用

    有用

  • 0

    疑问

    疑问

  • 0

    难过

    难过

  • 0

    无聊

    无聊

  • 0

    震惊

    震惊

版权所有 IT知识库 CopyRight © 2009-2015 IT知识库 IT610.com , All Rights Reserved. 京ICP备09083238号