好的,我已经花了一整天的时间阅读问答,但仍然无法完成。我需要创建一个自定义的确认(),而不是默认对话框,如果用户单击是,我使用引导模式返回真,否则返回假。
例子:
<a href="remove.php?id=3" onclick="return custom_confirm('Are you sure you want to remove this?');" />
我的自定义确认功能是:
function custom_confirm(message) {
// put message into the body of modal
$('#modal-custom-confirmation').on('show.bs.modal', function (event) {
// store current modal reference
var modal = $(this);
// update modal body help text
modal.find('.modal-body #modal-help-text').text(message);
});
// show modal ringer custom confirmation
$('#modal-custom-confirmation').modal('show');
// if Yes button is clicked, return true
// if No button is clicked, return false
// logic here...
}
Run Code Online (Sandbox Code Playgroud)
我的模态在这里:
<!-- modal: custom confirmation …Run Code Online (Sandbox Code Playgroud) 我正在使用NetBeans IDE编写Java代码.如何一次重命名变量的所有出现?