我使用Modal plugin from Twitter Boostrap JS显示在我的项目模态到模态。我使用PHP和数据库显示消息。这些消息具有“回复”和“删除”选项(每种都有一种模式)。我想将数组id传递到这些模式中。我该怎么做?传递数组值
这里我的显示代码:
<p><?php echo $row['message'];?></p>
<input type="hidden" id="msgid" value="<?php echo $row['id']?>">
<a href="#replyModal" data-toggle="modal" class="reply-to"><i class="icon-share-alt"></i>Reply</a>
<a href="#deletemodal" data-toggle="modal" class="reply-to"><i class="icon-trash"></i>Delete</a>
我想ID被传递到modals.So,我可以就此采取行动。
<div class="modal fade" id="replyModal">
<form action="replymsg.php" method="post" enctype="multipart/form-data">
<div class="modal-header">
<a class="close" data-dismiss="modal">×</a>
<h3>Reply:</h3>
</div>
<div class="modal-body">
<input type="text" id="msgid"></input>
<textarea name="message" style="width:98%; height:100px;"></textarea>
</div>
<div class="modal-footer">
<button type="submit" class="btn btn-primary">Post Reply</button>
</div>
</form>
</div>
如何对问题一般都望而却步。见http://stackoverflow.com/faq –
对不起,过帐怎么to.But,你可以做什么,如果有在网络上你的问题没有解决。 – Ankit