鼠标移入验证条后显示验证图片,轻松接入,不影响网页原有的排版和美观
var captchaIns = null
// 若使用降级方案引用初始化js
// initNECaptcha替换成initNECaptchaWithFallback
initNECaptcha({
captchaId: '从易盾申请的captchaId',
element: '#captcha',
mode: 'float',
width: '320px'
}, function onload (instance) {
captchaIns = instance
}, function onerror (err) {
// 初始化失败后触发该函数,err对象描述当前错误信息
console.log(err)
})