按12点修护代码1 HTML语法错误:代码片段中存在一个多余的div标签可能会导致页面渲染出错。2 JavaScript语法错误:代码片段中存在一处语法错误缺少了一个左括号可能会导致脚本无法正常执行。!DOCTYPE htmlhtml lang=en head meta charset=UTF-8 titleDocumenttitle head body divlink href=https
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
<div>
<link href="https://cdnjs.cloudflare.com/ajax/libs/sweetalert/1.1.3/sweetalert.min.css" rel="stylesheet">
<script src="https://cdnjs.cloudflare.com/ajax/libs/sweetalert/1.1.3/sweetalert.min.js"></script>
<script type="text/javascript">
swal({
title:'',
text:"为防止接口泛滥,特加验证",
type:'input',
closeOnConfirm: false,
closeOnCancel: false,
confirmButtonText: "确 认",
imageUrl: 'http://www.frpkj.com/tool/weixin/ewm.jpg',
imageSize: '200x200',
inputPlaceholder:"关注公众号:“SSN5068”获取验证码",
showLoaderOnConfirm:true,
},function(inputValue){
if (inputValue != '123') {
swal.showInputError('输入错误,关注即可获取');
return;
}
else{
swal.close('123');
return;
}
});
</script>
</div>
</body>
</html>
原文地址: https://www.cveoy.top/t/topic/bWQF 著作权归作者所有。请勿转载和采集!