-2

这是 META.PHP。我只是使用 JAVA 脚本传递会话值

<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="css/style.css"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js"></script>
<script src="./js/jquery.js"></script>
<script src="./js/laddubox.js"></script>
<script src="./js/pop.js"></script>
<script src="./js/jquery.js"></script>
<script type="text/javascript">
   var page = "<?php echo $_SESSION['pa'] ?>";
</script>
<title><?=$title?></title>
</head>

这是 JS 中的弹出窗口。现在我想要这个弹出窗口中的会话值,并且我已经创建了隐藏的输入字段以将值传递到另一个页面

function sin() {
    var lbox = new LadduBox();
    lbox.init({
        "width": 500,
        "height": 300,
        "HTML": '<div style="width:495px; height:272px; background-color:#ffffff; border:2px solid orange;"><table cellspacing="0" cellpadding="0" border="0" align="center" width="485" height="270" style="font-family:arial; font-size:20px; font-weight:bold;"><tr><td align="right" colspan="3"><img src="images/untitled-1.png" style="margin:10px; cursor:pointer;" id="btnClose"/></td></tr><tr><td height="30" colspan="3"><div style="font-family:arial; font-size:20px; color:#ff6c00; padding-left:200px;">SIGN IN</div></td></tr><tr><td><form method="get"><div style="margin:10px; font-size:14px;">EMAIL<br><input type="text" name="email"/></div><br><div style="margin-left:10px; margin-top:-10px; font-size:14px;">PASSWORD<br><input type="hidden" name="page" value=""/><input type="text" name="paswrd"/></div><br><input type="submit" value="submit"  class="subbg"/></form></td><td><img src="images/orbar.png" /></td><td align="center"><a href=sign_in.php?val=1"><img src="images/redfb.png" style="margin-bottom:7px;"/></a><br><a href=sign_in.php?val=2"><img src="images/redgoogle.png" style="margin-bottom:7px;"/></a><br><a href=sign_in.php?val=3"><img src="images/redtwitter.png" /></a></td></tr></table></div>',
        'btnCloseId': '#btnClose'
    });
    lbox.fire();
}

如果有人知道答案,请帮助我

4

2 回答 2

0

你有这个 HTML 片段:

<input type="hidden" name="page" value=""/>

只需将 PHP 值插入为:

<input type="hidden" name="page" value="<?php echo $_SESSION['pa'] ?>"/>
于 2013-10-07T13:53:09.857 回答
0

是否像您在 php 语句末尾缺少分号一样简单?变种页=“”;

于 2013-10-07T13:53:19.613 回答