Re: [請益] javascript 包含 php
※ 引述《a613204 (胖胖)》之銘言:
: <script language="javascript">
: function ccc()
: {
: if(document.form1.research_interests.value!="")
: {
: <?=$_SESSION[research_interests2];?>=document.form1.research_interests.value;
: -----------------------------------------------------------------------------
: }
: window.open('cp/cph.php','b',
: 'width=1100,height=800,toolbar=no,menubar=no,location=no,status=no,scrollbars=yes,resizable=no');
: return false;
: }
: </script>
: 請問虛線的地方要怎麼寫才是正確的呢??
要把 from 裡面的值帶到
php 的 SESSION 不可以用 javascript 傳值的寫法
<?=$_SESSION[research_interests2];?> 等同 echo $_SESSION[research_interests2];
你是要用這個值判斷這個 window.open 有沒有已經開啟吧?
如果只是這樣沒必要用 SESSION
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 59.104.146.65
推
08/31 09:30, , 1F
08/31 09:30, 1F
→
08/31 09:34, , 2F
08/31 09:34, 2F
討論串 (同標題文章)
本文引述了以下文章的的內容:
完整討論串 (本文為第 2 之 3 篇):
PHP 近期熱門文章
PTT數位生活區 即時熱門文章