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"); // 生成另外一个二维码 <form action="save.php" method="post" target="nm_iframe"> &nbs...
https://3gimg.qq.com/lightmap/v1/marker/index.html?marker=coord:37.6767600000,112.7297800000&key=TKUBZ-D24AF-GJ4JY-JDVM2-IBYKK-KEBCU&referer=p...
<!DOCTYPE html> <html> <head> <title>捕捉和冒泡</title> <meta charset="utf-8"> </head> <bo...
代码1:<!--代码开始--> <script src="http://lib.sinaapp.com/js/jquery/1.9.1/jquery-1.9.1.min.js"></script> <script>...
jQuery 插件——jqueryrotate,它可以实现旋转效果。jqueryrotate 支持所有主流浏览器,包括 IE6。如果提示方法不存在,可能是你的Jquery版本过低或者过高。基本语法:$('#img').rotate(90);//旋转90度其他的参数:参数类型说明默认值...
工厂模式虽然解决了创建多个对象的问题,但是并没有解决识别对象从属的问题.因为都属于object.因此出现了构造函数//构造函数名称首字母大写是规范 function Box(name,age){ this.name=name; this.age=age; this.run=funct...