在jquery
中是否有任何包含自定义标题和自定义内容的alert
和confirm
对话框。我已经搜索了很多网站,但找不到合适的网站。任何网站链接或任何内容都是值得欣赏的。
发布于 2013-07-15 15:18:54
我用jquery UI
组件制作了自定义的messagebox。这是http://jsfiddle.net/eraj2587/Pm5Fr/14/演示
只需传递标题名称、消息、按钮文本等参数即可。您可以在任何按钮点击时指定触发函数。这会对你有帮助的。
发布于 2015-07-22 05:49:46
试着使用SweetAlert,它就是最好的。您将获得大量的自定义和灵活性。
确认示例
sweetAlert(
{
title: "Are you sure?",
text: "You will not be able to recover this imaginary file!",
type: "warning",
showCancelButton: true,
confirmButtonColor: "#DD6B55",
confirmButtonText: "Yes, delete it!"
},
deleteIt()
);
发布于 2013-07-15 15:11:53
检查jsfiddle http://jsfiddle.net/CdwB9/3/并单击delete
function yesnodialog(button1, button2, element){
var btns = {};
btns[button1] = function(){
element.parents('li').hide();
$(this).dialog("close");
};
btns[button2] = function(){
// Do nothing
$(this).dialog("close");
};
$("<div></div>").dialog({
autoOpen: true,
title: 'Condition',
modal:true,
buttons:btns
});
}
$('.delete').click(function(){
yesnodialog('Yes', 'No', $(this));
})
这应该会对你有帮助
https://stackoverflow.com/questions/17648522
复制相似问题