javascript
xioao555
这是我的个人简介
展开
-
js获取网页URL参数 获取网页后面问号的参数
//获取url参数function getUrlParam(name) { var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); // 构造一个含有目标参数的正则表达式对象 var r = window.location.search.substr(1).match(reg); // 匹配目标参数...原创 2019-12-10 16:04:39 · 995 阅读 · 0 评论 -
纯JS 实现 简易 Toast 消息提示框
//提示信息 封装function Toast(msg,duration){ duration=isNaN(duration)?3000:duration; var m = document.createElement('div'); m.innerHTML = msg; m.style.cssText="font-size: .32rem;col...原创 2019-12-10 15:36:46 · 1483 阅读 · 0 评论 -
纯JS实现使用crypto-js 生成Sha256withRSA 2048位应用私钥以及公钥
//获取密钥对function getRsaKeys(func){ window.crypto.subtle.generateKey( { name: "RSA-OAEP", modulusLength: 2048, //can be 1024, 2048, or 4096 publicExpone...原创 2019-12-10 15:28:55 · 5270 阅读 · 1 评论