本文转载于:猿2048网站https://www.mk2048/blog/blog.php?id=h0b1j&title=%E8%85%BE%E8%AE%AF%E9%98%B2%E6%B0%B4%E5%A2%99%28%E6%BB%91%E5%8A%A8%E9%AA%8C%E8%AF%81%E7%A0%81%29%E7%9A%84%E7%AE%80%E5%8D%95%E4%BD%BF%E7%94%A8+https%3A%2F%2F007.qq
在线体验:https://007.qq/online.html
快速开始:https://007.qq/quick-start.html
简单使用:
1. 引入 JS
<script src="https://ssl.captcha.qq/TCaptcha.js"></script>
2. 写一个JS方法
// 腾讯防水墙 https://007.qq function submitFormWithCaptcha() { // 直接生成一个验证码对象 var captcha = new TencentCaptcha('AppID', function (res) { console.log(res) // res(未通过验证)= {ret: 1, ticket: null} // res(验证成功) = {ret: 0, ticket: "String", randstr: "String"} if (res.ret === 0) { //票据 //alert(res.ticket) //随机串 //alert(res.randstr) submitForm(); } }); // 显示验证码 captcha.show(); }
3. 页面的某个按钮调用这个方法。
4. 后台方法(略)
本文转载于:https://www.mk2048/blog/blog.php?id=h0b1j&title=%E8%85%BE%E8%AE%AF%E9%98%B2%E6%B0%B4%E5%A2%99%28%E6%BB%91%E5%8A%A8%E9%AA%8C%E8%AF%81%E7%A0%81%29%E7%9A%84%E7%AE%80%E5%8D%95%E4%BD%BF%E7%94%A8+https%3A%2F%2F007.qq
转载于:https://my.oschina/u/4181724/blog/3085406
发布者:admin,转转请注明出处:http://www.yc00.com/web/1755009784a5225871.html
评论列表(0条)