js生成二维码
(1).下载二维码类库
https://github.com/davidshimjs/qrcodejs
(2).引入类库
<script type="text/javascript" src="//static.runoob.com/assets/qrcode/qrcode.min.js"></script>
(3).输出网址二维码到页面
<div id="qrcode"></div>
<script type="text/javascript">
new QRCode(document.getElementById("qrcode"), "https://www.gaojiufeng.cn"); // 设置要生成二维码的链接
</script>(4).其他可选参数:
var qrcode = new QRCode("test", {
text: "https://www.gaojiufeng.cn",
width: 128,
height: 128,
colorDark : "#000000",
colorLight : "#ffffff",
correctLevel : QRCode.CorrectLevel.H
});(5).部分操作方法:
qrcode.clear(); // 清除代码
qrcode.makeCode("http://www.gaojiupan.cn"); // 生成另外一个二维码 离线缓存的开启实例使用apache设置 1.apache配置文件搜索Addtype,我的addtype已经存在项目,如下 AddType application/x-compress .Z AddType application/x-gz...
捕捉模式从DOM最顶层一直到最后一层,冒泡正好相反,具体运行以下实例测试.<!DOCTYPE html> <html> <head> <title>捕捉和冒泡</title> <meta charset="...
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title></title> </head> <body>...
<!doctype html> <html> <head> <meta charset="utf-8"> <title>无标题文档</title> </head> ...
//原型的缺点 function Box(){} Box.prototype={ 'name':'gao', age:23, family:['哥哥','姐姐','妹妹'], &...
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>录制</title> <script ...