2016-02-16 18 views
-1

我在php頁面上有多個項目,要編輯每個項目,我想將按鈕的標題作爲參數發送給iFrame(彈出窗口),我該怎麼做?如何發送php獲取參數給iFrame?

我有一個這樣的代碼:

<button class="btn_edit ui-button-text-only" title="245" role="button" aria-disabled="false"><span class="ui-button-text">Edit this item</span></button> 
 

 
<button class="btn_edit ui-button-text-only" title="246" role="button" aria-disabled="false"><span class="ui-button-text">Edit this item</span></button> 
 

 
<button class="btn_edit ui-button-text-only" title="247" role="button" aria-disabled="false"><span class="ui-button-text">Edit this item</span></button> 
 

 
<button class="btn_edit ui-button-text-only" title="248" role="button" aria-disabled="false"><span class="ui-button-text">Edit this item</span></button> 
 

 
<button class="btn_edit ui-button-text-only" title="249" role="button" aria-disabled="false"><span class="ui-button-text">Edit this item</span></button>

itemID =標題變量。

得到類似的結果:iframe src="index.php?type=1296727025&itemID.

我試圖append()但沒有工作,

$dialog_edit.append($("<iframe class='no-border full-width-height' />").attr("src", "index.php?type=1296727025&tx_productmanager_pi1="+productID+"&no_cache=1")); 
 
$dialog_edit.dialog('open');

沒有任何一個有想法?

+0

什麼是你的'追加()'其他的代碼? –

+0

iFrame或彈出? – Phiter

+0

禰追加碼是這樣的: $( 'btn_edit_product。 ')點擊(函數(){ \t變種的productID = $(本).attr(' 標題'); \t $ dialog_edit.append($(」。