需要有人來幫助我的the jQuery Dialog plugin by Eric Martin - Simple ModeljQuery的對話框 - 從PHP傳遞變量值jQuery函數
我有一個包含我想傳遞一個值到另一個頁面的鏈接PHP頁面。因此,我需要幫助如何將值傳遞給包含下面的頁面URL var的jQuery腳本?
Profile.php
<div id='basic-modal'>
<a href='#' class='basic'>Jquery Dialog Demo</a>
</div>
注:當我點擊鏈接,它會調用jQuery的基本模型DIV從Basic.js
Basic.js
jQuery(function ($) {
// Load dialog on click
$('#basic-modal .basic').click(function (e) {
// Display an external page using an iframe
var src = "http://365.ericmmartin.com/";
$.modal('<iframe src="' + src + '" height="450" width="830" style="border:0">', {
closeHTML:"",
containerCss:{
backgroundColor:"#fff",
borderColor:"#fff",
height:450,
padding:0,
width:830
},
overlayClose:true
});
return false;
});
});
注:在上面,我想var src包含變量值,我 s應該將其從Profile.php中傳遞出來。我應該怎麼做?
您的問題還不清楚。顯示包含您想要傳遞的值的代碼 – Chibuzo 2011-12-21 05:23:24
嗨Chibuzo,感謝您的回覆。這裏是我想傳遞給Basic.js的頁面鏈接變量的示例=> http://domain.com/Poll.php?id=1&validate=yes – Ray 2011-12-21 05:27:42
嗨Chibuzo,基本上,Profile.php應該看起來像這個: