JavaScript实如今线生成高强度随机密码工具-toolfk程序员在线工具网

    本文要推荐的[ToolFk]是一款程序员常用的线上免费测试工具箱,ToolFk 特点是专一于程序员平常的开发工具,不用安装任何软件,只要把内容贴上按一个执行按钮,就能获取到想要的内容结果。ToolFk还支持 BarCode条形码在线生成QueryList采集器PHP代码在线运行PHP混淆、加密、解密Python代码在线运行JavaScript在线运行YAML格式化工具HTTP模拟查询工具HTML在线工具箱JavaScript在线工具箱CSS在线工具箱JSON在线工具箱Unixtime时间戳转换Base64/URL/Native2Ascii转换CSV转换工具箱XML在线工具箱WebSocket在线工具Markdown 在线工具箱Htaccess2nginx 转换进制在线转换在线加密工具箱在线伪原创工具在线APK反编译在线网页截图工具在线随机密码生成在线生成二维码Qrcode在线Crontab表达式生成在线短网址生成在线计算器工具。等20多个平常程序员开发工具,算是一个很是全面的程序员工具箱网站。javascript


網站名稱:ToolFk
網站鏈結:www.toolfk.com/
工具连接:www.toolfk.com/tool-passwo…php

代码教學

本工具[在线高强度随机密码生成器工具]使用JavaScript编写
css

STEP 1html

password.png

STEP 2java

核心代码以下python

function appendHtml(name,url){
    var tmp_html     = $("#tmp").html().replaceAll("#NAME#",name).replaceAll("#URL#",url);
    $(".show-area").html(tmp_html);
}
$(function(){
    $(".generate-password").click(function(){
        for (var e = $("#pgLength").val(), a = "abcdefghijklmnopqrstuvwxyz", t = "ABCDEFGHIJKLMNOPQRSTUVWXYZ", r = "0123456789", i = "!@#$%^&*()_+~`|}{[]:;?><,./-=", n = "", o = n; n.length < e; )
            entity1 = Math.ceil(a.length * Math.random() * Math.random()),
                entity2 = Math.ceil(r.length * Math.random() * Math.random()),
                entity3 = Math.ceil(i.length * Math.random() * Math.random()),
                entity4 = Math.ceil(t.length * Math.random() * Math.random()),
            $("#chkl").is(":checked") && n.length < e && (n += a.charAt(entity1)),
            $("#chku").is(":checked") && n.length < e && (n += t.charAt(entity4)),
            $("#chkn").is(":checked") && n.length < e && (n += r.charAt(entity2)),
            $("#chksc").is(":checked") && n.length < e && (n += i.charAt(entity3)),
            o == n && (rand = Math.floor(4 * Math.random()) + 1,
                1 == rand ? n += a.charAt(entity1) : 2 == rand ? n += t.charAt(entity4) : 3 == rand ? n += r.charAt(entity2) : 4 == rand && (n += i.charAt(entity3)),
                o = n);
        toolfk.report('generate-password',n);
        appendHtml("@lang('toolfk.lang_text_padd_rand_num')",n);
    });
});复制代码


值得一試的三個理由:

  1. 整合各種程序员开发中常用的开发测试工具。nginx

  2. 简洁美观大气的网站页面程序员

  3. 支持 在线格式化执行代码、APK在线反编译、在线高强度密码生成、在线网页截图 等二十多種工具服务web

  4. 同时还推荐一下它的姐妹网 www.videofk.com 视频下载工具箱 json



相关文章
相关标签/搜索