jQuery-peeper是一款jQuery显示隐藏和复制表单密码字段插件。该插件提供多种方式显示和隐藏表单password字段的密码,并额外提供复制密码字段为纯文本的功能。
使用方法
安装
npm install jquery-peeper
在页面中引入下面的文件。
<link rel="stylesheet" href="/jquery-peeper/dist/css/jquery-peeper.min.css" />
<script src="/path/to/jquery.js"></script>
<script src="/path/to/jquery-peeper.min.js"></script>

初始化插件
$(function() {
$("#password1").peeper();
});
配置参数
$(function() {
$("#password1").peeper({
showEvent: 'mouseup', // event to show password
showElement: '.peeper-mask', // DOM element (eg. button to show password)
mask: true, // show mask
maskOpacity: 1, //mask opacity (eg. 0.5)
autohide: true, // hide password after time
autohideTime: 4000, // hide password time in ms
maskCss: 'gray', // mask style (eg. red, green, blue or custom)
showPasswordCss: 'fa fa-key', // show password icon/style
copyPasswordCss: 'fa fa-copy', // copy password icon/style
showCopyBtn: true, // copy password button
showPasswordBtn: true, // show password button
animateDuration: 300 // mask animation time
});
});
该jQuery显示隐藏和复制表单密码字段插件的github网址为:https://github.com/msztorc/jquery-peeper
版权声明
版权说明: 仅限用于学习和研究目的;不得将上述内容用于商业和非法用途!否则一切后果自负。我们非常重视版权问题,如有侵权请邮件至(171373236#qq.com)与我们联系处理,敬请谅解!





















