{"id":10402,"date":"2022-05-12T01:01:05","date_gmt":"2022-05-11T17:01:05","guid":{"rendered":"https:\/\/www.zhangxinxu.com\/wordpress\/?p=10402"},"modified":"2022-05-12T01:01:05","modified_gmt":"2022-05-11T17:01:05","slug":"js-barcode","status":"publish","type":"post","link":"https:\/\/www.zhangxinxu.com\/wordpress\/2022\/05\/js-barcode\/","title":{"rendered":"JS\u4e0e\u6761\u5f62\u7801\u7684\u751f\u6210"},"content":{"rendered":"<p>by <a href=\"https:\/\/www.zhangxinxu.com\/\">zhangxinxu<\/a> from <a href=\"https:\/\/www.zhangxinxu.com\/wordpress\/?p=10402\">https:\/\/www.zhangxinxu.com\/wordpress\/?p=10402<\/a> \u946b\u7a7a\u95f4-\u946b\u751f\u6d3b<br \/>\n\u672c\u6587\u6b22\u8fce\u5206\u4eab\u4e0e\u805a\u5408\uff0c\u5168\u6587\u8f6c\u8f7d\u5c31\u4e0d\u5fc5\u4e86\uff0c\u5c0a\u91cd\u7248\u6743\uff0c\u5708\u5b50\u5c31\u8fd9\u4e48\u5927\uff0c\u82e5\u6025\u7528\u53ef\u4ee5\u8054\u7cfb\u6388\u6743\u3002<\/p>\n<p><script>window.wxShareImgUrl = 'https:\/\/www.zhangxinxu.com\/study\/image\/share\/202205-barcode.png';<\/script><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/image.zhangxinxu.com\/image\/blog\/202205\/barcode-cover.png\" width=\"480\" height=\"306\" alt=\"\u6761\u5f62\u7801\u56fe\u7247\u793a\u610f\" class=\"alignright clip thumb size-medium\" \/><\/p>\n<h3>\u4e00\u3001\u4f7f\u7528\u8fd9\u4e2aGithub\u9879\u76ee<\/h3>\n<p>JS\u751f\u6210\u6761\u5f62\u7801\uff1a<a href=\"https:\/\/github.com\/lindell\/JsBarcode\" rel=\"noopener\" target=\"_blank\">https:\/\/github.com\/lindell\/JsBarcode<\/a><\/p>\n<p>\u5b98\u65b9\u63d0\u4f9b\u4e86\u4e00\u4e2a\u5b9e\u65f6\u7684\u6761\u5f62\u7801\u751f\u6210\u5668\uff0c<a href=\"https:\/\/lindell.me\/JsBarcode\/generator\/\" rel=\"noopener\" target=\"_blank\">\u70b9\u51fb\u8fd9\u91cc<\/a>\u8bbf\u95ee\u3002<\/p>\n<p>\u5982\u679c\u4e0a\u9762\u7684\u5730\u5740\u8bbf\u95ee\u4e0d\u4e86\uff0c\u4e5f\u53ef\u4ee5<a href=\"https:\/\/www.zhangxinxu.com\/study\/202205\/BarcodeGenerator.html\" rel=\"noopener\" target=\"_blank\">\u8bbf\u95ee\u8fd9\u4e2a\u4e2d\u6587\u7248<\/a>\uff0c\u6211\u628a\u5b98\u65b9\u7684\u751f\u6210\u5668\u7ffb\u8bd1\u4e86\u4e0b\uff0c\u653e\u5728\u4e86\u81ea\u5df1\u670d\u52a1\u5668\u4e0a\uff0c\u907f\u514d N \u5e74\u540e\u4e0a\u9762\u5730\u5740\u5931\u6548\u540e\u65e0\u6cd5\u8bbf\u95ee\uff08\u5df2\u7ecf\u8e29\u8fc7\u5f88\u591a\u6b21\u5751\u4e86\uff09\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/image.zhangxinxu.com\/image\/blog\/202205\/2022-05-11_230739.png\" width=\"565\" height=\"287\" alt=\"JS\u6761\u5f62\u7801\u751f\u6210\u5668\u9875\u9762\u622a\u56fe\" class=\"alignnone size-medium\" \/><\/p>\n<h3>\u4e8c\u3001\u5982\u4f55\u4f7f\u7528\uff1f<\/h3>\n<p>\u4f7f\u7528\u8fd8\u662f\u5f88\u65b9\u4fbf\u7684\u3002<\/p>\n<p>\u9996\u5148\uff0c\u7b2c\u4e00\u6b65\uff0c\u9875\u9762\u4e2d\u5728\u9700\u8981\u663e\u793a\u6761\u5f62\u7801\u7684\u5730\u65b9\u653e\u597d\u5bf9\u5e94\u7684\u56fe\u50cf\u5143\u7d20\uff0c\u652f\u6301 SVG, Canvas \u6216\u8005\u662f IMG \u5143\u7d20\u3002<\/p>\n<pre>&lt;svg id=\"barcode\"&gt;&lt;\/svg&gt;\r\n&lt;!-- \u6216 --&gt;\r\n&lt;canvas id=\"barcode\"&gt;&lt;\/canvas&gt;\r\n&lt;!-- \u6216 --&gt;\r\n&lt;img id=\"barcode\"\/&gt;<\/pre>\n<p>\u7136\u540e\uff0c\u7b2c\u4e8c\u6b65\uff0c\u5f15\u5165 JS \u6587\u4ef6\uff1a<\/p>\n<pre>&lt;script src=\".\/JsBarcode.all.min.js\"&gt;&lt;\/script&gt;<\/pre>\n<p>\u6700\u540e\uff0c\u7b2c\u4e09\u6b65\uff0c\u6267\u884c\u5bf9\u5e94\u7684 JS \u4ee3\u7801\uff0c\u4f8b\u5982\uff1a<\/p>\n<pre>JsBarcode(\"#barcode\", \"iam zhangxinxu\");<\/pre>\n<p>\u5373\u53ef\u5927\u529f\u544a\u6210\u3002<\/p>\n<p>\u773c\u89c1\u4e3a\u5b9e\uff0c\u60a8\u53ef\u4ee5\u72e0\u72e0\u5730\u70b9\u51fb\u8fd9\u91cc\uff1a<a href=\"https:\/\/www.zhangxinxu.com\/study\/202205\/js-barcode-demo.php\" rel=\"noopener\" target=\"_blank\">JSBarcode\u6700\u57fa\u7840\u6761\u5f62\u7801\u4f7f\u7528demo<\/a><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/image.zhangxinxu.com\/image\/blog\/202205\/2022-05-12_001544.png\" width=\"441\" height=\"220\" alt=\"\u4e8c\u7ef4\u7801\u4f7f\u7528 demo \u793a\u610f\" class=\"alignnone size-medium\" \/><\/p>\n<h4>\u53c2\u6570<\/h4>\n<p>JsBarcode API \u8fd8\u662f\u5f88\u4e30\u5bcc\u7684\uff0c\u652f\u6301\u5404\u79cd\u6837\u5f0f\u7684\u81ea\u5b9a\u4e49\uff0c\u652f\u6301\u5404\u79cd\u6761\u5f62\u7801\u7f16\u7801\u3002<\/p>\n<p>\u5173\u4e8e\u6837\u5f0f\u81ea\u5b9a\u4e49\u53c2\u6570\u89c1\u4e0b\u8868\uff1a<\/p>\n<table border=\"0\" class=\"params_table\" cellspacing=\"1\">\n<thead>\n<tr>\n<th>\u53ef\u9009\u53c2\u6570<\/th>\n<th>\u9ed8\u8ba4\u503c<\/th>\n<th>\u7c7b\u578b<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>format<\/code><\/td>\n<td><code>\"auto\" (CODE128)<\/code><\/td>\n<td><code>String<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>width<\/code><\/td>\n<td><code>2<\/code><\/td>\n<td><code>Number<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>height<\/code><\/td>\n<td><code>100<\/code><\/td>\n<td><code>Number<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>displayValue<\/code><\/td>\n<td><code>true<\/code><\/td>\n<td><code>Boolean<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>text<\/code><\/td>\n<td><code>undefined<\/code><\/td>\n<td><code>String<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>fontOptions<\/code><\/td>\n<td><code>\"\"<\/code><\/td>\n<td><code>String<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>font<\/code><\/td>\n<td><code>\"monospace\"<\/code><\/td>\n<td><code>String<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>textAlign<\/code><\/td>\n<td><code>\"center\"<\/code><\/td>\n<td><code>String<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>textPosition<\/code><\/td>\n<td><code>\"bottom\"<\/code><\/td>\n<td><code>String<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>textMargin<\/code><\/td>\n<td><code>2<\/code><\/td>\n<td><code>Number<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>fontSize<\/code><\/td>\n<td><code>20<\/code><\/td>\n<td><code>Number<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>background<\/code><\/td>\n<td><code>\"#ffffff\"<\/code><\/td>\n<td><code>String (CSS color)<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>lineColor<\/code><\/td>\n<td><code>\"#000000\"<\/code><\/td>\n<td><code>String (CSS color)<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>margin<\/code><\/td>\n<td><code>10<\/code><\/td>\n<td><code>Number<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>marginTop<\/code><\/td>\n<td><code>undefined<\/code><\/td>\n<td><code>Number<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>marginBottom<\/code><\/td>\n<td><code>undefined<\/code><\/td>\n<td><code>Number<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>marginLeft<\/code><\/td>\n<td><code>undefined<\/code><\/td>\n<td><code>Number<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>marginRight<\/code><\/td>\n<td><code>undefined<\/code><\/td>\n<td><code>Number<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>valid<\/code><\/td>\n<td><code>function(valid){}<\/code><\/td>\n<td><code>Function<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u5173\u4e8e\u6761\u5f62\u7801\u7684\u77e5\u8bc6\u53ef\u4ee5<a href=\"https:\/\/baike.baidu.com\/item\/%E6%9D%A1%E5%BD%A2%E7%A0%81\/278988\" rel=\"noopener nofollow\" target=\"_blank\">\u53c2\u89c1\u6b64\u767e\u79d1<\/a>\uff0c\u76ee\u524d\u4e3b\u8981\u7528\u5728\u5546\u54c1\u4e2d\uff0c\u8d85\u5e02\u6536\u94f6\u7684\u65f6\u5019\uff0c\u626b\u4e2a\u7801\uff0c\u6ef4\u4e00\u4e0b\uff0c\u4ef7\u94b1\u5c31\u51fa\u6765\u4e86\u3002<\/p>\n<p>\u867d\u7136\u6761\u5f62\u7801\u5728\u751f\u6d3b\u4e2d\u5f88\u6709\u7528\uff0c\u4f3c\u4e4e\u5728\u4e92\u8054\u7f51\u9886\u57df\u4e0d\u5982\u4e8c\u7ef4\u7801\uff0c\u4e3a\u4ec0\u4e48\u5462\uff1f\u771f\u7684\u662f\u5728Web\u4e2d\u4e00\u65e0\u662f\u5904\u5417\uff1f<\/p>\n<h3>\u4e09\u3001\u6761\u5f62\u7801\u5728Web\u4e2d\u6709\u4ec0\u4e48\u7528\uff1f<\/h3>\n<p>Web\u4e2d\u6211\u4eec\u85cf\u533f\u4fe1\u606f\u7528\u7684\u591a\u662f\u4e8c\u7ef4\u7801\uff0c\u56e0\u4e3a\u53ef\u4ee5\u5305\u542b\u66f4\u591a\u7684\u4fe1\u606f\uff0c\u5305\u62ec\u4e2d\u6587\u5728\u5185\u90fd\u53ef\u4ee5\u5305\u62ec\u3002<\/p>\n<p>\u800c\u6761\u5f62\u7801\u4e2d\u6587\u662f\u4e0d\u652f\u6301\u7684\uff0c\u53ea\u80fd\u662f\u82f1\u6587\u5b57\u6bcd\u548c\u6570\u5b57\u7b49\u6bd4\u8f83\u57fa\u7840\u7684 Unicode \u5b57\u7b26\u3002<\/p>\n<p>\u4f46\u662f\uff0c\u6761\u5f62\u7801\u4e5f\u662f\u6709\u4f18\u70b9\u7684\uff0c\u90a3\u5c31\u662f\u6761\u5f62\u7801\u7684\u56fe\u5f62\u53ef\u4ee5\u7406\u89e3\u4e3a\u662f\u4e00\u7ef4\u5e73\u9762\u7ed3\u6784\uff0c\u9020\u578b\u66f4\u52a0\u7b80\u5355\uff0c\u800c\u4e8c\u7ef4\u7801\u662f\u4e8c\u7ef4\u56fe\u5f62\u7ed3\u6784\uff0c\u9020\u578b\u590d\u6742\u4e9b\u3002<\/p>\n<p>\u9020\u578b\u7b80\u5355\u5c31\u6709\u4e2a\u597d\u5904\uff0c\u53ef\u4ee5\u66f4\u52a0\u9690\u853d\u5730\u57cb\u5165\u4fe1\u606f\u3002<\/p>\n<p>\u4f8b\u5982\uff0c\u6211\u4eec\u5c06\u6761\u5f62\u7801\u7684\u9ad8\u5ea6\u53d8\u5f97\u8db3\u591f\u5c0f\uff0c\u5219\u6761\u5f62\u7801\u8868\u73b0\u5f97\u5c31\u5982\u540c\u865a\u7ebf\u4e00\u822c\u3002<\/p>\n<p>\u4f8b\u5982\uff0c\u4e0b\u56fe\u662f\u6761\u5f62\u7801\u751f\u6210\u5668\u9875\u9762\u7684\u9ad8\u5ea6\u8c03\u6574\u4e3a10\u7684\u65f6\u5019\uff0c10\u4e2a\u963f\u62c9\u4f2f\u6570\u5b57\u7684\u8868\u73b0\u6548\u679c\uff1a<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/image.zhangxinxu.com\/image\/blog\/202205\/2022-05-12_001720.png\" width=\"201\" height=\"44\" alt=\"\u6761\u5f62\u7801\u6548\u679c\u793a\u610f\" class=\"alignnone size-medium\" \/><\/p>\n<p>\u5982\u679c\u9ad8\u5ea6\u53ea\u67091px\uff0c\u518d\u6c34\u5e73\u5e73\u94fa\uff0c\u5c31\u50cf\u4e00\u4e2a\u6709\u70b9\u8bbe\u8ba1\u611f\u7684\u5206\u9694\u865a\u7ebf\uff0c\u6bd4\u65b9\u8bf4\u672c\u6587\u8fd9\u53e5\u8bdd\u4e0b\u9762\u7684\u8fd9\u6761\u865a\u7ebf\uff0c\u5176\u5b9e\u85cf\u4e86\u6211\u7684\u540d\u5b57\u3002<\/p>\n<div style=\"height:3px;background:url(data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAX4AAAADCAAAAACxejuLAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAAUUlEQVR42mP4DwRngABEQtj\/oQCZhS4P4aOqgKlCqEaIIExBFkWWR1WDsAOXbdhVoZqG6jJU07D7Dbu5uE1Al8PmJ2Rz0UOHYTT4R4N\/xAY\/AF7fCi8GY7xlAAAAAElFTkSuQmCC) repeat-x;\"><\/div>\n<p>\u5f53\u7136\uff0c\u7406\u8bba\u4e0a\u7b80\u5355\uff0c\u5b9e\u9645\u4e0a\u8981\u60f3\u8bc6\u522b\u8fd8\u662f\u6709\u96be\u5ea6\u7684\uff0c\u4e00\u65e6\u5e73\u94fa\u5faa\u73af\uff0c\u5230\u5e95\u54ea\u91cc\u662f\u5934\uff0c\u54ea\u91cc\u662f\u5c3e\uff0c\u5c31\u5f88\u96be\u8fa8\u8ba4\u4e86\uff0c\u8fd8\u9700\u8981\u60f3\u5176\u4ed6\u7684\u529e\u6cd5\u624d\u884c\u3002<\/p>\n<hr>\n<p>\u4e4b\u524d\u8bb2\u201c\u8749\u539f\u5219\u201d\u7684\u65f6\u5019\uff08<a href=\"https:\/\/www.zhangxinxu.com\/wordpress\/?p=5963\">\u6587\u7ae0\u8bbf\u95ee\u8fd9\u91cc<\/a>\uff09\u6709\u8bb2\u8fc7CSS\u521b\u5efa\u968f\u673a\u6761\u7eb9\u80cc\u666f\u7684\u7b56\u7565\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"\/\/image.zhangxinxu.com\/image\/blog\/201702\/2017-02-16_233519.png\" width=\"372\" height=\"340\" alt=\"\u968f\u673a\u5e95\u7eb9\u80cc\u666f\" class=\"alignnone size-medium\" \/><\/p>\n<p>\u5b9e\u9645\u4e0a\uff0c\u8fd9\u79cd\u770b\u8d77\u6765\u968f\u673a\u7684\u6761\u7eb9\u548c\u6761\u5f62\u7801\u662f\u6709\u5f88\u591a\u795e\u4f3c\u7684\u5730\u65b9\u7684\uff0c\u5982\u679c\u6211\u4eec\u901a\u8fc7\u67d0\u79cd\u65b9\u6cd5\uff0c\u5c06\u6761\u5f62\u7801\u7684\u7eb9\u8def\u85cf\u5728\u968f\u673a\u80cc\u666f\u4e2d\uff0c\u662f\u4e0d\u662f\u5c31\u662f\u4e00\u79cd\u975e\u5e38\u9690\u853d\uff0c\u4f46\u540c\u65f6\u53c8\u4e0d\u5bb9\u6613\u7834\u574f\u7684\u6dfb\u52a0\u6c34\u5370\u7684\u65b9\u5f0f\u5462\uff1f<\/p>\n<h3>\u56db\u3001JS\u751f\u6210\u4e8c\u7ef4\u7801<\/h3>\n<p>\u987a\u4fbf\u63d0\u4e0b\u5982\u4f55\u4f7f\u7528 JS \u751f\u6210\u4e8c\u7ef4\u7801\uff0c\u5c31\u662f\u8fd9\u4e2a\u9879\u76ee\u4e86\uff1a<a href=\"https:\/\/github.com\/davidshimjs\/qrcodejs\" rel=\"noopener\" target=\"_blank\">https:\/\/github.com\/davidshimjs\/qrcodejs<\/a><\/p>\n<p>\u4f7f\u7528\u5f88\u7b80\u5355\uff0c\u5f15\u5165 JS\uff0c\u7136\u540e\u6267\u884c\u7c7b\u4f3c\u4e0b\u9762\u7684 JavaScript \u4ee3\u7801\u5c31 OK \u4e86\uff1a<\/p>\n<pre>&lt;div id=\"qrcode\"&gt;&lt;\/div&gt;\r\n&lt;script&gt;\r\nnew QRCode(document.getElementById(\"qrcode\"), \"https:\/\/www.zhangxinxu.com\");\r\n&lt;\/script&gt;<\/pre>\n<p>\u6211\u81ea\u5df1\u65e9\u4e9b\u5e74\u4e5f\u505a\u4e86\u4e2a\u5728\u7ebf\u7684\u4e8c\u7ef4\u7801\u751f\u6210\u5668\uff0c\u53ef\u4ee5\u8bbf\u95ee\u8fd9\u91cc\uff1a<a href=\"https:\/\/www.zhangxinxu.com\/sp\/qrcode.html\" rel=\"noopener\" target=\"_blank\">\u5728\u7ebf\u8f6c\u4e8c\u7ef4\u7801\u5c0f\u5de5\u5177<\/a><\/p>\n<p>\u975e\u5e38\u7b80\u6d01\u597d\u7528\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/image.zhangxinxu.com\/image\/blog\/202205\/2022-05-12_003414.png\" width=\"421\" height=\"132\" alt=\"\u4e8c\u7ef4\u7801\u751f\u6210\u622a\u56fe\" class=\"alignnone size-medium\" \/><\/p>\n<h3>\u4e94\u3001\u7ed3\u8bed\u8bf4\u660e<\/h3>\n<p>\u54d7\u5566\u54d7\u5566\uff0c\u597d\u50cf\u8bb2\u4e86\u5f88\u591a\uff0c\u62ac\u5934\u4e00\u770b\uff0c\u597d\u50cf\u53c8\u6ca1\u8bb2\u591a\u5c11\u3002<\/p>\n<p>\u8bb2\u70b9\u5176\u4ed6\u4fe1\u606f\u5427\uff0c\u6700\u8fd1\u6211\u5728 B\u7ad9 \u5f00\u4e86\u4e2a\u540d\u53eb<a href=\"https:\/\/space.bilibili.com\/31556431\/channel\/collectiondetail?sid=398176\" rel=\"noopener\" target=\"_blank\" style=\"filter:brightness(1.15)\">\u201c\u6563\u88c5Web\u524d\u7aef\u6280\u672f\u201d<\/a>\u7684\u5408\u96c6\uff0c\u4f1a\u66f4\u65b0\u4e00\u4e9b\u524d\u7aef\u89c6\u9891\u5c0f\u77e5\u8bc6\uff0c\u6bcf\u4e00\u671f10\u5206\u949f\u5de6\u53f3\u3002<\/p>\n<p>\u5b58\u8d27\u5de8\u591a\uff0c\u53ef\u4ee5\u66f4\u65b0\u5341\u5e74\uff0c\u7ba1\u9971\u7ba1\u591f\uff0c\u6211\u5199\u7684\u5c0f\u8bf4\u53ef\u4ee5\u4e0d\u770b\uff0c\u4f46\u662f\u6b64\u5408\u96c6\u4e0d\u5bb9\u9519\u8fc7\uff0c\u8d76\u5feb\u70b9\u51fb\u4e0a\u9762\u7684\u94fe\u63a5\uff0c\u7136\u540e\u70b9\u4e2a\u5173\u6ce8\u5427\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/image.zhangxinxu.com\/image\/blog\/202205\/2022-05-12_004340.png\" width=\"659\" height=\"366\" alt=\"\u6563\u88c5Web\u524d\u7aef\u6280\u672f\" class=\"alignnone size-medium\" \/><\/p>\n<p>\u672c\u6587\u4e3a\u539f\u521b\u6587\u7ae0\uff0c\u6b22\u8fce\u5206\u4eab\uff0c\u52ff\u5168\u6587\u8f6c\u8f7d\uff0c\u5982\u679c\u5b9e\u5728\u559c\u6b22\uff0c\u53ef\u6536\u85cf\uff0c\u6c38\u4e0d\u8fc7\u671f\uff0c\u4e14\u4f1a\u53ca\u65f6\u66f4\u65b0\u77e5\u8bc6\u70b9\u53ca\u4fee\u6b63\u9519\u8bef\uff0c\u9605\u8bfb\u4f53\u9a8c\u4e5f\u66f4\u597d\u3002<br \/>\n\u672c\u6587\u5730\u5740\uff1a<a href=\"https:\/\/www.zhangxinxu.com\/wordpress\/?p=10402\">https:\/\/www.zhangxinxu.com\/wordpress\/?p=10402<\/a><\/p>\n<p>\uff08\u672c\u7bc7\u5b8c\uff09<\/p>\n","protected":false},"excerpt":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/image.zhangxinxu.com\/image\/blog\/202205\/barcode-cover.png\" width=\"160\" height=\"102\" alt=\"\u6761\u5f62\u7801\u56fe\u7247\u793a\u610f\" class=\"alignright size-medium\" loading=\"lazy\" \/><\/p>\n<p>\u672c\u6587\u4e3b\u8981\u4ecb\u7ecd\u5982\u4f55\u4f7f\u7528 JS \u4ee3\u7801\u5b9e\u65f6\u751f\u6210\u6761\u5f62\u7801\uff0c\u4ee5\u53ca\u4ecb\u7ecd\u6761\u5f62\u7801\u5728 Web \u5e94\u7528\u4e2d\u7684\u4f18\u52bf\uff0c\u542f\u53d1\u82e5\u5e72\u53ef\u4ee5\u4f7f\u7528\u6761\u5f62\u7801\u7684\u573a\u666f\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[180],"tags":[1295,693,1830,1204,522,1829,218,1205],"_links":{"self":[{"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/posts\/10402"}],"collection":[{"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/comments?post=10402"}],"version-history":[{"count":0,"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/posts\/10402\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/media?parent=10402"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/categories?post=10402"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/tags?post=10402"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}