Files
ClassContent/历届学生/fontendsix/项目练习/学生项目/陶瑞/js/html/dalong.html
2024-09-27 02:06:13 +08:00

50 lines
1.2 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="../css/clean.css">
<link rel="stylesheet" href="../css/pb.css">
<link rel="stylesheet" href="../css/dalong.css">
<title>dalong</title>
</head>
<body>
<button>登录</button>
</body>
<script src="../js/dalong.js">
</script>
<script>
// 初始化插件,并传入配置参数
// 配置参数
// 插件内部默认的参数
// 使用者自定义传入的参数
// 可选参数 必填参数
var dia = new Dialog({
title: '请您确认',
message: '哈哈哈哈',
confirmButtonText: 'OK',
showConfirmButton: true,
cancelButtonText: '取消2',
cancelButtonColor: '',
});
document.querySelector("button").onclick = () => {
dia.open();
// dia.oncancel( function () {
// console.log("你点击取消2");
// } );
dia.onconfirm( function () {
console.log("你点击确定按钮2");
} );
}
</script>
</html>