<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>test</title>
<script src="https://asset.cpming.top/js-myutils/jquery-1.12.3.min.js"></script>
<script src="https://asset.cpming.top/js-myutils/dialog/jq_mydialog.js"></script>
<link href="https://asset.cpming.top/js-myutils/dialog/my_dialog.css" type="text/css" rel="stylesheet" />
<script type="text/javascript">
$(function (){
$("#show").click(function (){
var options = {
//width: width+"px", //默认为页面宽度的80%
//title: "提示", //标题默认为提示
content: $("input").val(), //提示内容
//cancel_btn_title: "取消", //取消按钮的文本
//confirm_btn_title: "确认", //确认按钮的文本
cancel_btn_click: function (e){ //取消按钮点击事件
$.myconfirm("getDialog").mydialog("hide");
alert("cancel");
},
confirm_btn_click: function (e){ //确认按钮点击事件
$.myconfirm("getDialog").mydialog("hide");
alert("confirm");
}
};
$.myconfirm(options);
});
});
</script>
</head>
<body>
<input type="text" value="确定要删除吗?!"/>
<button id="show">显示</button>
</body>
</html>