[英]three buttons on bootstrap modal
I'm trying to get a Bootstrap (most recent version) modal to use a third button in the footer. 我正在尝试获取Bootstrap(最新版本)模式,以在页脚中使用第三个按钮。
<div class="modal-footer">
<button type="button" id="btn-remove" class="btn btn-danger" >Del</button>
<button type="button" id="close-btn" class="btn btn-default" data-dismiss="modal">Cancel</button>
<button type="button" id="save-btn" class="btn btn-primary">Save changes</button>
</div>
However the javascript environment keeps complaining that I am attaching a click event to an element which doesn't implement the HTMLElement interface. 但是,JavaScript环境一直抱怨我将click事件附加到了未实现HTMLElement接口的元素上。 WTH?
什么 I use exactly the same techinque to wire up the other two buttons, binding with jQuery to the buttono element by id:
我使用完全相同的技术来连接其他两个按钮,并使用jQuery通过id将jQuery绑定到buttono元素:
$('#close-btn').on('click', self.clear_modal_values);
$('#save-btn').on('click', self.save_modal_values);
$('#btn-remove').on('click', self.remove_exceptions);
Is there something inherently different about the btn-danger
treatment ? 对
btn-danger
处理固有地不同吗? Or something else obvious I have screwed up? 还是我明显搞砸了?
事实证明错误在其他地方,而这仅仅是错误发生的地方。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.