jquery 生成二维码 作者: HAS 时间: 2020-12-14 分类: 学习笔记,JavaScript/jQuery,手把手教程 评论 [scode type="green"]这几天项目有一个新功能需要动态生成二维码,在网上琢磨一番之后知道了一个插件[/scode] [tag type="info"]head头部引入插件和jQuery[/tag] [scode type="yellow"]jQuery一定要在引入插件之前引入[/scode] ```javascript ``` [tag type="info"]body添加div容器[/tag] ```html ``` [tag type="info"]jQuery代码[/tag] [scode type="lblue"]直接生成二维码[/scode] ```javascript ``` [scode type="lblue"]带属性生成二维码[/scode] ```javascript ``` ## 插件引用地址 [scode type="lblue"]https://zjt.haser.top/js/qrcode.js[/scode] 可以另存为之后保存到本地 [scode type="lblue"]jQuerycdn: https://www.jq22.com/cdn/[/scode] [scode type="lblue"]github地址:https://github.com/jeromeetienne/jquery-qrcode[/scode] [button color="danger" icon="fontello fontello-gratipay" url="https://cnd.haser.top/2020/12/14/536814990.zip "]插件下载[/button]