在我的网页上,我有这个链接:
<\a onclick="#" class="compose"></a>
通过单击链接,此脚本被激活:
$(function(){
$('.compose').click(function() { // Button which will activate our modal
$('#popup_bestanden_edit_name').reveal({ // The item which will be opened with reveal
animation: 'fade', // fade, fadeAndPop, none
animationspeed: 600, // how fast animtions are
closeonbackgroundclick: true, // if you click background will modal close?
dismissmodalclass: 'close' // the class of a button or element that will close an open modal
});
return false;
});
});
上面的脚本将使这个 DIV 可见,这是一个弹出窗口:
<div id="popup_bestanden_edit_name">
<div id="popupheading">
Naam wijzigen
</div>
<div id="popupcontent">
<p><form action="" method="post" name="naamwijzigen"><input name="naam" type="text"></form></p>
<a href="#" class="popupbutton green close"><img src="<?php echo $domein.'/images/confirm_popup/tick.png'; ?>">Ja, wijzigen</a>
<a href="#" class="popupbutton red close"><img src="<?php echo $domein.'/images/confirm_popup/cross.png'; ?>">Nee, annuleren</a>
</div>
打开的弹出窗口使人们有机会在网站上编辑文档的名称。所以当点击链接时<\a onclick="#" class="compose"></a>
,它必须向$fetch_row['id']
弹出窗口发送一个 id ( ),所以我可以在进一步的脚本中使用它。
有谁知道如何做到这一点?