fuc/public/assets/baba/test/showModal.html
2025-02-23 13:30:57 +08:00

45 lines
1.3 KiB
HTML
Executable File

<!doctype html>
<html lang="zh">
<head>
<meta charset="UTF-8">
<title>test</title>
</head>
<body>
<button data-event="test">open dialog</button>
<script src="../lib/jquery-1.10.2.js"></script>
<script src="../dist/dialog.js"></script>
<script>
$('button[data-event=test]').on('click', function() {
var d = dialog({
title: '消息',
content: '风吹起的青色衣衫,夕阳里的温暖容颜,你比以前更加美丽,像盛开的花<br>——许巍《难忘的一天》',
okValue: '确 定',
ok: function() {
dialog()
.title('提示2')
.content('hello world')
.button([{
value: '打开',
autofocus: true,
callback: function() {
dialog()
.title('提示')
.showModal();
}
}])
.show();
return false;
},
cancelValue: '取消',
cancel: function() {}
});
d.showModal();
});
</script>
</body>
</html>