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"); // 生成另外一个二维码 捕捉模式从DOM最顶层一直到最后一层,冒泡正好相反,具体运行以下实例测试.<!DOCTYPE html> <html> <head> <title>捕捉和冒泡</title> <meta charset="...
<form action="save.php" method="post" target="nm_iframe"> &nbs...
<!-- 三个核心方法 openDatabase:这个方法使用现有数据库或创建...
代码1:<!--代码开始--> <script src="http://lib.sinaapp.com/js/jquery/1.9.1/jquery-1.9.1.min.js"></script> <script>...
通过FormData对象可以组装一组用 XMLHttpRequest发送请求的键/值对。它可以更灵活方便的发送表单数据,因为可以独立于表单使用。如果你把表单的编码类型设置为multipart/form-data ,则通过FormData传输的数据格式和表单通过submit() 方法传输的数据格式相同...
二期项目中生成的简历二维码是使用canvs生成的,微信浏览器中不能识别二维码,只能扫码。懒的换phpqrcode,于是转canvs。//设置一个url var url = "{yun:}$config.sy_weburl{/yun}/mingli/index....