使用标题传递获取变量

时间:2012-01-28 03:13:45

标签: javascript

我的页面中有一个阴影框,我将一些值传递给它,

function edit(facility_group_id){
    Shadowbox.open({
        content:    'register_facility_form.php?facility_group_id=' + facility_group_id ,   
        player:     'iframe',
        height:     1150,
        width:      2200,
        options: {
            onClose:
            function() {
                top.location        = "index.php?page=backup_and_restore";
            }
        }
    });
};

如果我想传递另一个变量,如下所示,我该如何在内容部分中执行此操作,

function edit(facility_group_id,facility_name){
    Shadowbox.open({
     content:    'register_facility_form.php?facility_group_id=' + facility_group_id , 

任何人都可以帮助我。

1 个答案:

答案 0 :(得分:0)

您只需在每个查询字符串变量之间添加&符号:

function edit(facility_group_id,facility_name){
Shadowbox.open({
 content:    'register_facility_form.php?facility_group_id=' + facility_group_id + '&facility_name=' + facility_name ,