调用、获取滑动验证码
// 验证码插件路径
/captcha/html/index.html
// 例如您的用户端访问地址为:
http://127.0.0.1:3333/anquandizhi/
// 滑动验证码插件访问地址则为:
http://127.0.0.1:3333/anquandizhi/captcha/html/index.html// WEB端
<script>
window.addEventListener("message", (event) => {
if (event.origin !== window.location.origin) return;
const message = event.data;
if (typeof message === "object") {
console.log("CAPTCHA:", message);
}
});
<script>Last updated