实现bootstrap模型

时间:2013-06-10 10:49:15

标签: php javascript html5 twitter-bootstrap bootstrap-modal

我有一个显示我的数据库中的表格的php页面,我想使用删除按钮。

像这样:http://i.stack.imgur.com/laZZP.png

这个按钮必须显示一个确认窗口(是/否),因为我使用Bootstrap模态。

像这样:http://i.stack.imgur.com/Zlf9y.png

如何使用“是”按钮删除所选文章?

1 个答案:

答案 0 :(得分:0)

您可以将点击事件绑定在是按钮上 假设yes按钮的标识为Yes。可以使用类似于以下的代码。

$("#Yes").click(function() {
    //your ajax call, or any desired implementation
});

jQuery用于上面的代码中,因此请确保在项目中添加jQuery。