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"); // 生成另外一个二维码 WebSql的原理是浏览器集成了sqllite数据库,Js操作,浏览器协助完成,没有多复杂。<!-- 三个核心方法  ...
开发需求如下,商品下单后需要指定送到日期:送达日期为周一 周三 周六 ,如果今天周一,用户选择周一即为下一周周一。代码如下:<html> <head> <meta charset="utf-8"> <title>...
通过FormData对象可以组装一组用 XMLHttpRequest发送请求的键/值对。它可以更灵活方便的发送表单数据,因为可以独立于表单使用。如果你把表单的编码类型设置为multipart/form-data ,则通过FormData传输的数据格式和表单通过submit() 方法传输的数据格式相同...
//构造函数 function Box(name,age){ this.name=name; this.age=age; this.run=function(){ return this.name+'--'+this.age; } } var&nbs...
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>录制</title> <script ...
和腾讯合作的项目活动中腾讯要求我们必须隐藏朋友圈分享功能,一直以为没有官方Api,百般查找才在文档中找到,可能是自己不太细心。微信官方文档在jsjdk的"界面操作"中有详细说明:关闭当前网页窗口接口wx.closeWindow();批量隐藏功能按钮接口wx.hideMenuIte...