Bootstrap确认 - 对元素属性应用onConfirm功能

问题描述 投票:0回答:1

我想将js函数应用于我的确认按钮,我在页面外创建元素并使用ajax获取它们,因此我可以设置函数in-properties而不是$('#id')非常重要。确认()

这是我到目前为止:确认是弹出,但没有在确认时调用do_it函数。 (当我从控制台运行do_it时,它完美地运行)。

<button id="someid" class="btn" data-toggle="confirmation" data-onConfirm=do_it(1,2)>
                            ButtonText
</button>
javascript twitter-bootstrap confirm
1个回答
3
投票

我认为你使用了错误的属性值。它应该是“确认数据”。请参阅http://mistic100.github.io/Bootstrap-Confirmation/的链接

© www.soinside.com 2019 - 2024. All rights reserved.