javascript获取wx.config内部字段解决微信分享

前端之家收集整理的这篇文章主要介绍了javascript获取wx.config内部字段解决微信分享前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

背景

在微信分享开发的时候我们通常的流程是

PHP;"> GetSignPackage(); ?> <Meta charset="UTF-8"> 微信<a href="/tag/fenxiang/" target="_blank" class="keywords">分享</a>@H_<a href="/tag/502/" target="_blank" class="keywords">502</a>_8@ </head> <body> </body> <script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script> <script> wx.config({ appId: '<?php echo $signPackage["appId"];?>',timestamp: <?php echo $signPackage["timestamp"];?>,nonceStr: '<?php echo $signPackage["nonceStr"];?>',signature: '<?php echo $signPackage["signature"];?>',jsApiList: ['onMenuShareTimeline' 'onMenuShareAppMessage' ] }); <p>wx.ready(function() {</p> <p>wx.onMenuShareTimeline({<br /> title: '',// <a href="/tag/fenxiang/" target="_blank" class="keywords">分享</a><a href="/tag/biaoti/" target="_blank" class="keywords">标题</a><br /> link: '',// <a href="/tag/fenxiang/" target="_blank" class="keywords">分享</a><a href="/tag/lianjie/" target="_blank" class="keywords">链接</a><br /> imgUrl: '',// <a href="/tag/fenxiang/" target="_blank" class="keywords">分享</a>图标<br /> success: function() {<br /> // <a href="/tag/yonghu/" target="_blank" class="keywords">用户</a>确认<a href="/tag/fenxiang/" target="_blank" class="keywords">分享</a><a href="/tag/houzhixing/" target="_blank" class="keywords">后执行</a>的回调<a href="/tag/hanshu/" target="_blank" class="keywords">函数</a><br /> },cancel: function() {<br /> // <a href="/tag/yonghu/" target="_blank" class="keywords">用户</a>取消<a href="/tag/fenxiang/" target="_blank" class="keywords">分享</a><a href="/tag/houzhixing/" target="_blank" class="keywords">后执行</a>的回调<a href="/tag/hanshu/" target="_blank" class="keywords">函数</a><br /> }<br /> });</p> <p>wx.onMenuShareAppMessage({<br /> title: '',// <a href="/tag/fenxiang/" target="_blank" class="keywords">分享</a><a href="/tag/biaoti/" target="_blank" class="keywords">标题</a><br /> desc: '',// <a href="/tag/fenxiang/" target="_blank" class="keywords">分享</a>描述<br /> link: '',// <a href="/tag/fenxiang/" target="_blank" class="keywords">分享</a>图标<br /> type: '',// <a href="/tag/fenxiang/" target="_blank" class="keywords">分享</a>类型,music、video或link,不填默认为link<br /> dataUrl: '',// 如果type是music或video,则要提供数据<a href="/tag/lianjie/" target="_blank" class="keywords">链接</a>,默认为空<br /> success: function() {<br /> // <a href="/tag/yonghu/" target="_blank" class="keywords">用户</a>确认<a href="/tag/fenxiang/" target="_blank" class="keywords">分享</a><a href="/tag/houzhixing/" target="_blank" class="keywords">后执行</a>的回调<a href="/tag/hanshu/" target="_blank" class="keywords">函数</a><br /> },cancel: function() {<br /> // <a href="/tag/yonghu/" target="_blank" class="keywords">用户</a>取消<a href="/tag/fenxiang/" target="_blank" class="keywords">分享</a><a href="/tag/houzhixing/" target="_blank" class="keywords">后执行</a>的回调<a href="/tag/hanshu/" target="_blank" class="keywords">函数</a><br /> }<br /> });</p> <p>});</p> </script> </html> </pre> </div> <p>上面是一个<a href="/tag/PHP/" target="_blank" class="keywords">PHP</a><a href="/tag/wenjian/" target="_blank" class="keywords">文件</a>,这样的<a href="/tag/daima/" target="_blank" class="keywords">代码</a>的一个很大缺点是前后端未分离耦合度太高,再一就是混合写不是很美观,所以我们要让<a href="/tag/PHP/" target="_blank" class="keywords">PHP</a>和HTML分离,要实现<a href="/tag/fenxiang/" target="_blank" class="keywords">分享</a><a href="/tag/gongneng/" target="_blank" class="keywords">功能</a>,首先就是要<a href="/tag/diaoyong/" target="_blank" class="keywords">调用</a>用微信的jssdk Api<a href="/tag/huoqu/" target="_blank" class="keywords">获取</a>到配置参数, 这个必须是要通过<a href="/tag/PHP/" target="_blank" class="keywords">PHP</a><a href="/tag/houtai/" target="_blank" class="keywords">后台</a>语言来<a href="/tag/huoqu/" target="_blank" class="keywords">获取</a>的,然后将这些参数配置于wx.config中,在wx.config之前要先引入<span style="color: #3366ff"><h3>http://res.wx.qq.com/open/js/jweixin-1.0.0.js</h3> 然后就可以写<a href="/tag/fenxiang/" target="_blank" class="keywords">分享</a>的<a href="/tag/hanshu/" target="_blank" class="keywords">函数</a>了,他们的依赖关系是wx.config 需要js库和config内部的参数,<a href="/tag/fenxiang/" target="_blank" class="keywords">分享</a>依赖wx.config 所以最重要的就把<a href="/tag/PHP/" target="_blank" class="keywords">PHP</a>的配置参数分离出来单独<a href="/tag/huoqu/" target="_blank" class="keywords">获取</a>即可</p> <p><h3><a href="/tag/jiejuefang/" target="_blank" class="keywords">解决方</a>案</h3> 将<a href="/tag/huoqu/" target="_blank" class="keywords">获取</a>配置参数的<a href="/tag/PHP/" target="_blank" class="keywords">PHP</a>写作为接口,在js里使用ajax<a href="/tag/diaoyong/" target="_blank" class="keywords">调用</a>,<a href="/tag/huoqu/" target="_blank" class="keywords">获取</a>参数并转换为对象,再通过回调<a href="/tag/hanshu/" target="_blank" class="keywords">函数</a>将ajax<a href="/tag/huoqu/" target="_blank" class="keywords">获取</a>的参数塞到wx.config中</p> <p><a href="/tag/daima/" target="_blank" class="keywords">代码</a>结构及<a href="/tag/gongneng/" target="_blank" class="keywords">功能</a></p> <p style="text-align: center"><p class="pic_center"><img id="theimg" alt="" onclick="window.open(this.src)" src="https://files.jb51.cc/file_images/article/201603/201639102801401.png?201629102810" /></p> </p> <ul> <li><h3><span style="color: #333333">index.html <a href="/tag/yemian/" target="_blank" class="keywords">页面</a>入口</h3></li> <li><h3><span style="color: #333333">weixin.<a href="/tag/PHP/" target="_blank" class="keywords">PHP</a> 服务器端<a href="/tag/huoqu/" target="_blank" class="keywords">获取</a>配置参数</h3></li> <li><h3><span style="color: #333333">configdata.<a href="/tag/PHP/" target="_blank" class="keywords">PHP</a>将配置转为借口<a href="/tag/shuchu/" target="_blank" class="keywords">输出</a></h3></li> <li><h3><span style="color: #333333">getconfig.js 用ajax<a href="/tag/huoqu/" target="_blank" class="keywords">获取</a>configdata.<a href="/tag/PHP/" target="_blank" class="keywords">PHP</a>的数据</h3></li> <li><h3><span style="color: #333333">share.js <a href="/tag/fenxiang/" target="_blank" class="keywords">分享</a>回调函</h3></li> <li><h3><span style="color: #333333">webpack.config.js webpack<a href="/tag/peizhiwenjian/" target="_blank" class="keywords">配置文件</a></h3></li> <li><h3><span style="color: #333333">index.js 打包后最终html<a href="/tag/diaoyong/" target="_blank" class="keywords">调用</a>js<a href="/tag/wenjian/" target="_blank" class="keywords">文件</a></h3></li> </ul> <p><span style="color: #800000"><h3>index.html html@R_<a href="/tag/403/" target="_blank" class="keywords">403</a>_356@</h3></p> <div class="jb51code"> <pre class="brush:xhtml;"> <!DOCTYPE html> <html lang="en"> <head> <<a href="/tag/Meta/" target="_blank" class="keywords">Meta</a> charset="UTF-8"> <title>静态<a href="/tag/yemian/" target="_blank" class="keywords">页面</a>微信<a href="/tag/fenxiang/" target="_blank" class="keywords">分享</a>测试@H_<a href="/tag/502/" target="_blank" class="keywords">502</a>_8@ </head> <body> <script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script> <script src="statics/js/index.js"></script> </body> </html></pre> </div> <p><span style="color: #800000"><h3>configdata.<a href="/tag/PHP/" target="_blank" class="keywords">PHP</a> <a href="/tag/houtai/" target="_blank" class="keywords">后台</a><a href="/tag/huoqu/" target="_blank" class="keywords">获取</a>配置的参数 </h3>注意url要写上自己被<a href="/tag/fenxiang/" target="_blank" class="keywords">分享</a>的<a href="/tag/yemian/" target="_blank" class="keywords">页面</a>url不然会报invalid signature<a href="/tag/cuowu/" target="_blank" class="keywords">错误</a></p> <div class="jb51code"> <pre class="brush:<a href="/tag/PHP/" target="_blank" class="keywords">PHP</a>;"> <?php class JSSDK { private $appId; private $appSecret; <p>public function __construct($appId,$appSecret) {<br /> $this->appId = $appId;<br /> $this->appSecret = $appSecret;<br /> }</p> <p>public function getSignPackage() {<br /> $jsapiTicket = $this->getJsApiTicket();<br /> $url = "<a href="http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI">http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI</a>]";<br /> $timestamp = time();<br /> $nonceStr = $this->createNonceStr();</p> <p>// 这里参数的顺序要按照 key 值 ASCII 码升序排序<br /> $string = "jsapi_ticket=$jsapiTicket&noncestr=$nonceStr&timestamp=$timestamp&url=$url";</p> <p>$signature = sha1($string);</p> <p>$signPackage = array(<br /> "appId" => $this->appId,"nonceStr" => $nonceStr,"timestamp" => $timestamp,"url" => $url,"signature" => $signature,"rawString" => $string<br /> );<br /> return $signPackage;<br /> }</p> <p>private function createNonceStr($length = 16) {<br /> $chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";<br /> $str = "";<br /> for ($i = 0; $i < $length; $i++) {<br /> $str .= substr($chars,mt_rand(0,strlen($chars) - 1),1);<br /> }<br /> return $str;<br /> }</p> <p>private function getJsApiTicket() {<br /> // jsapi_ticket 应该全局存储与更新,以下代码以写入到文件中做示例<br /> $data = json_decode(file_get_contents("jsapi_ticket.json"));<br /> if ($data->expire_time < time()) {<br /> $accessToken = $this->getAccessToken();<br /> $url = "<a href="https://api.weixin.qq.com/cgi-bin/ticket/getticket?type=jsapi&access_token=$accessToken">https://api.weixin.qq.com/cgi-bin/ticket/getticket?type=jsapi&access_token=$accessToken</a>";<br /> $res = json_decode($this->httpGet($url));<br /> $ticket = $res->ticket;<br /> if ($ticket) {<br /> $data->expire_time = time() + 7000;<br /> $data->jsapi_ticket = $ticket;<br /> $fp = fopen("jsapi_ticket.json","w");<br /> fwrite($fp,json_encode($data));<br /> fclose($fp);<br /> }<br /> } else {<br /> $ticket = $data->jsapi_ticket;<br /> }</p> <p>return $ticket;<br /> }</p> <p>private function getAccessToken() {<br /> // access_token 应该全局存储与更新,以下<a href="/tag/daima/" target="_blank" class="keywords">代码</a>以写入到<a href="/tag/wenjian/" target="_blank" class="keywords">文件</a>中做示例<br /> $data = json_decode(file_get_contents("access_token.json"));<br /> if ($data->expire_time < time()) {<br /> $url = "<a href="https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=$this->appId&secret=$this->appSecret">https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=$this->appId&secret=$this->appSecret</a>";<br /> $res = json_decode($this->httpGet($url));<br /> $access_token = $res->access_token;<br /> if ($access_token) {<br /> $data->expire_time = time() + 7000;<br /> $data->access_token = $access_token;<br /> $fp = fopen("access_token.json",json_encode($data));<br /> fclose($fp);<br /> }<br /> } else {<br /> $access_token = $data->access_token;<br /> }<br /> return $access_token;<br /> }</p> <p>private function httpGet($url) {<br /> $curl = curl_init();<br /> curl_setopt($curl,CURLOPT_RETURNTRANSFER,true);<br /> curl_setopt($curl,CURLOPT_TIMEOUT,500);<br /> curl_setopt($curl,CURLOPT_URL,$url);</p> <p>$res = curl_exec($curl);<br /> curl_close($curl);</p> <p>return $res;<br /> }<br /> }</p> </pre> </div> <p><h3><span style="color: #800000">weixin.<a href="/tag/PHP/" target="_blank" class="keywords">PHP</a> 将配置参数格式化<a href="/tag/shuchu/" target="_blank" class="keywords">输出</a></h3></p> <div class="jb51code"> <pre class="brush:<a href="/tag/PHP/" target="_blank" class="keywords">PHP</a>;"> <?php <p>require_once "weixin.php";<br /> $jssdk = new JSSDK(appId,appSecretecret);<br /> $signPackage = $jssdk->GetSignPackage();</p> <p>class Config{<br /> var $appId;<br /> var $timestamp;<br /> var $nonceStr;<br /> var $signature;<br /> var $url;<br /> } </p> <p>$config = new Config(); </p> <p>$config -> appId = $signPackage["appId"];<br /> $config -> timestamp = $signPackage["timestamp"];<br /> $config -> nonceStr = $signPackage["nonceStr"];<br /> $config -> signature = $signPackage["signature"];<br /> $config -> url = $signPackage["url"]; </p> <p>echo json_encode($config);<br /> ?></p> </pre> </div> <p><span style="color: #800000"><h3>getconfig.js 使用ajax<a href="/tag/huoqu/" target="_blank" class="keywords">获取</a>接口数据(配置参数)</h3></p> <div class="jb51code"> <pre class="brush:js;"> var getConfig = function(callback) { $.ajax({ url: "http://www.goxueche.com/api/configdata.<a href="/tag/PHP/" target="_blank" class="keywords">PHP</a>",type: "get",success: function(data) { callback(data); } }) } <p>module.exports = getConfig;</p> </pre> </div> <p>share.js <a href="/tag/fenxiang/" target="_blank" class="keywords">分享</a><a href="/tag/hanshu/" target="_blank" class="keywords">函数</a></p> <div class="jb51code"> <pre class="brush:js;"> var getWeixincofig = require("./getconfig.js"); getWeixincofig(shareweixin); <p>function shareweixin(data) {</p> <p>var data = JSON.parse(data);<br /> console.log(data);</p> <p>window.wx.config({<br /> debug:true,appId: data.appId,timestamp: data.timestamp,nonceStr: data.nonceStr,signature: data.signature,jsApiList: ['checkJsApi','onMenuShareTimeline','onMenuShareAppMessage']<br /> });</p> <p>wxShare();<br /> }</p> <p>function wxShare() {<br /> //检测api是否生效<br /> wx.ready(function() {<br /> wx.checkJsApi({<br /> jsApiList: [<br /> 'getNetworkType','previewImage'<br /> ],success: function(res) {<br /> console.log(JSON.stringify(res));<br /> }<br /> });<br /> //<a href="/tag/fenxiang/" target="_blank" class="keywords">分享</a>给好友<br /> wx.onMenuShareAppMessage({<br /> title: '趣学车-有温度的互联网驾校',desc: '想去学车,就趣学车!',link: '<a href="http://www.goxueche.com',imgUrl">http://www.goxueche.com',imgUrl</a>: '<a href="http://www.goxueche.com/....png">http://www.goxueche.com/....png</a>'<br /> });</p> <p>//<a href="/tag/fenxiang/" target="_blank" class="keywords">分享</a>到朋友圈<br /> wx.onMenuShareTimeline({<br /> title: '趣学车-有温度的互联网驾校',imgUrl: '<a href="http://www.goxueche.com/....png">http://www.goxueche.com/....png</a>'<br /> });</p> <p>});<br /> }</p> </pre> </div> <p>webpack.config.js</p> <div class="jb51code"> <pre class="brush:js;"> var webpack = require('webpack'); module.exports = { entry: { index: './share.js',},output: { path: './',filename: '[name].js' } }; </pre> </div> <p>本文已被整理到了《<a target="_blank" href="//www.jb51.cc/Special/879.htm">JavaScript微信开发技巧汇总</a>》,欢迎大家学习阅读。</p> <p>为大家推荐现在关注度比较高的微信小程序教程一篇:<a target="_blank" href="//www.jb51.cc/Special/900.htm">《微信小程序开发教程》</a>小编为大家精心整理的,希望喜欢。</p> <p>以上就是本文的全部<a href="/tag/neirong/" target="_blank" class="keywords">内容</a>,希望对大家的学习有所帮助。</p></div> <div class="topcard-tags"><a href="/tag/javascripthuoquwxconfigneibuziduan/" class="tag_link" target="_blank">javascript获取wx.config内部字段</a><a href="/tag/javascriptjiejueweixinfenxiang/" class="tag_link" target="_blank">javascript解决微信分享</a></div> <ul class="list-group"> <li class="list-group-item"><a href="/js/49750.html" title="js仿支付宝填写支付密码效果实现多方框输入密码">上一篇:js仿支付宝填写支付密码效果实现多</a><a href="/js/49748.html" title="javascript时间排序算法实现活动秒杀倒计时效果" class="text-muted pull-right">下一篇:javascript时间排序算法实现活动秒</a> </li> </ul> </div> </div> </div> <!-- row end --> <div class="row row-sm"> <div class="col-sm-12 col-md-12 col-lg-12"> <div class="card"> <ins class="adsbygoogle" style="display:block" data-ad-format="autorelaxed" data-ad-client="ca-pub-4605373693034661" data-ad-slot="9144498553"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script></div> </div> </div> <div class="row row-sm"> <div class="col-sm-12 col-md-12 col-lg-12"> <div class="card"> <div class="title"><h1>猜你在找的JavaScript相关文章</h1></div> <div class="list_con"> <a href="/js/997747.html" title="Javascript中的事件冒泡与捕获"><div class="title">Javascript中的事件冒泡与捕获</div> <div class="summary">事件冒泡和事件捕获 起因:今天在封装一个bind函数的时候,发现el.addEventListener函数支...</div> <time class="summary">作者:前端之家 时间:2021-02-22</time> </a> </div> <div class="list_con"> <a href="/js/997746.html" title="搞懂js中小数运算精度问题原因及解决办法"><img class="lazy" src="/images/np.jpg" data-original="/res/2021/02-22/19/e40e1eb184cb2a5d8c5f6c5e730d8e82.png" title="" width="160" height="90" style="float:right;margin-left:30px;display:none;" /><div class="title">搞懂js中小数运算精度问题原因及解决办法</div> <div class="summary">js小数运算会出现精度问题 js number类型 JS 数字类型只有number类型,number类型相当于其...</div> <time class="summary">作者:前端之家 时间:2021-02-22</time> </a> </div> <div class="list_con"> <a href="/js/997744.html" title="搞懂:前端跨域问题JS解决跨域问题VUE代理解决跨域问题原理"><div class="title">搞懂:前端跨域问题JS解决跨域问题VUE代理解决跨域问题原理</div> <div class="summary">什么是跨域 跨域 : 广义的跨域包含一下内容 : 1.资源跳转(链接跳转,重定向跳转,表单提...</div> <time class="summary">作者:前端之家 时间:2021-02-22</time> </a> </div> <div class="list_con"> <a href="/js/997743.html" title="前端对base64编码的理解,原生js实现字符base64编码"><div class="title">前端对base64编码的理解,原生js实现字符base64编码</div> <div class="summary">@ &quot;TOC&quot; 常见对base64的认知(不完全正确) 首先对base64常见的认知,也是...</div> <time class="summary">作者:前端之家 时间:2021-02-22</time> </a> </div> <div class="list_con"> <a href="/js/997742.html" title="搞懂:MVVM模型以及VUE中的数据绑定数据劫持发布订阅模式"><div class="title">搞懂:MVVM模型以及VUE中的数据绑定数据劫持发布订阅模式</div> <div class="summary">搞懂:MVVM模式和Vue中的MVVM模式 MVVM MVVM : 的缩写,说都能直接说出来 :模型, :视图...</div> <time class="summary">作者:前端之家 时间:2021-02-22</time> </a> </div> <div style="border-bottom: 1px solid #f4f4f4;margin-top:20px;"> <ins class="adsbygoogle" style="display:block" data-ad-format="fluid" data-ad-layout-key="-fr-2o+fp-dx-wx" data-ad-client="ca-pub-4605373693034661" data-ad-slot="4561116489"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> </div><div class="list_con"> <a href="/js/997318.html" title="js判断浏览器是否支持webGL"><div class="title">js判断浏览器是否支持webGL</div> <div class="summary">起因是我之前开发的网页,用到了three.js制作了一个3d的旋转球体效果。 在各种浏览器上运行...</div> <time class="summary">作者:前端之家 时间:2021-02-14</time> </a> </div> <div class="list_con"> <a href="/js/997317.html" title="js判断undefined和null"><div class="title">js判断undefined和null</div> <div class="summary">js判断undefined js判断null js判断null和undefined</div> <time class="summary">作者:前端之家 时间:2021-02-14</time> </a> </div> <div class="list_con"> <a href="/js/997316.html" title="将文字自动转为banner打印形式的工具"><div class="title">将文字自动转为banner打印形式的工具</div> <div class="summary">http://patorjk.com/software/taag/</div> <time class="summary">作者:前端之家 时间:2021-02-14</time> </a> </div> <div class="list_con"> <a href="/js/997315.html" title="聊一聊 bootstrap 的轮播图插件"><div class="title">聊一聊 bootstrap 的轮播图插件</div> <div class="summary">今天做工作的时候,轻车熟路的做完,又用到了bootstrap的轮播图,觉得有必要安利一下这个插...</div> <time class="summary">作者:前端之家 时间:2021-02-14</time> </a> </div> <div class="list_con"> <a href="/js/997314.html" title="js实现图片无缝循环跑马灯"><div class="title">js实现图片无缝循环跑马灯</div> <div class="summary">html 代码 css js代码 function mylsRunHorseLight() { if (mylsTimer != null) { clearIn...</div> <time class="summary">作者:前端之家 时间:2021-02-14</time> </a> </div> <div style="border-bottom: 1px solid #f4f4f4;margin-top:20px;"> <ins class="adsbygoogle" style="display:block" data-ad-format="fluid" data-ad-layout-key="-fr-2o+fp-dx-wx" data-ad-client="ca-pub-4605373693034661" data-ad-slot="4561116489"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> </div></div> </div> </div> </div> <!-- left end--> <!-- right --> <div class="col-sm-12 col-md-12 col-lg-3"> <!-- row --> <div class="row row-sm"> <div class="col-sm-12 col-md-12 col-lg-12"> <div class="card"> <label class="main-content-label ">编程分类</label> <div class="cate mt-20"><a href="/html/" title="HTML">HTML</a><a href="/html5/" title="HTML5">HTML5</a><a href="/js/" title="JavaScript">JavaScript</a><a href="/css/" title="CSS">CSS</a><a href="/jquery/" title="jQuery">jQuery</a><a href="/bootstrap/" title="Bootstrap">Bootstrap</a><a href="/angularjs/" title="Angularjs">Angularjs</a><a href="/typescript/" title="TypeScript">TypeScript</a><a href="/vue/" title="Vue">Vue</a><a href="/dojo/" title="Dojo">Dojo</a><a href="/json/" title="Json">Json</a><a href="/electron/" title="Electron">Electron</a><a href="/nodejs/" title="Node.js">Node.js</a><a href="/extjs/" title="extjs">extjs</a><a href="/express/" title="Express ">Express </a><a href="/xml/" title="XML">XML</a><a href="/es6/" title="ES6">ES6</a><a href="/ajax/" title="Ajax">Ajax</a><a href="/flash/" title="Flash">Flash</a><a href="/unity/" title="Unity">Unity</a><a href="/react/" title="React">React</a><a href="/flex/" title="Flex">Flex</a><a href="/antdesign/" title="Ant Design">Ant Design</a><a href="/webfrontend/" title="Web前端">Web前端</a><a href="/weapp/" title="微信小程序">微信小程序</a><a href="/wxmp/" title="微信公众号">微信公众号</a><div class="clearfix"></div> </div> </div> </div> </div> <!-- row end --> <!-- row --> <div class="row row-sm"> <div class="col-sm-12 col-md-12 col-lg-12"> <div class="card"> <!-- f2er-rightads --> <ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-4605373693034661" data-ad-slot="7756441254" data-ad-format="auto" data-full-width-responsive="true"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> </div> </div> </div> <!-- row end --> <!-- row --> <div class="row row-sm"> <div class="col-sm-12 col-md-12 col-lg-12"> <div class="card"> <label class="main-content-label ">最新文章</label> <ul class="n-list"><li><a href="/js/997747.html" title="Javascript中的事件冒泡与捕获" target="_blank">• Javascript中的事件冒泡与</a></li> <li><a href="/js/997746.html" title="搞懂js中小数运算精度问题原因及解决办法" target="_blank">• 搞懂js中小数运算精度问题</a></li> <li><a href="/js/997744.html" title="搞懂:前端跨域问题JS解决跨域问题VUE代理解决跨域问题原理" target="_blank">• 搞懂:前端跨域问题JS解决</a></li> <li><a href="/js/997743.html" title="前端对base64编码的理解,原生js实现字符base64编码" target="_blank">• 前端对base64编码的理解,</a></li> <li><a href="/js/997742.html" title="搞懂:MVVM模型以及VUE中的数据绑定数据劫持发布订阅模式" target="_blank">• 搞懂:MVVM模型以及VUE中的</a></li> <li><a href="/js/997493.html" title="js实现横向跑马灯效果" target="_blank">• js实现横向跑马灯效果</a></li> <li><a href="/js/997318.html" title="js判断浏览器是否支持webGL" target="_blank">• js判断浏览器是否支持webG</a></li> <li><a href="/js/997317.html" title="js判断undefined和null" target="_blank">• js判断undefined和null</a></li> <li><a href="/js/997316.html" title="将文字自动转为banner打印形式的工具" target="_blank">• 将文字自动转为banner打印</a></li> <li><a href="/js/997315.html" title="聊一聊 bootstrap 的轮播图插件" target="_blank">• 聊一聊 bootstrap 的轮播图</a></li> </ul> </div> </div> </div> <!-- row end --> <!-- row --> <div class="row row-sm"> <div class="col-sm-12 col-md-12 col-lg-12"> <div class="card"> <label class="main-content-label ">热门标签 <span class="pull-right tx-12"> <a href="/all" target="_blank">更多 ►</a></span> </label> <div class="topcard-tags"><a href="/tag/guanbiyangao/" title="关闭广告" target="_blank">关闭广告</a><a href="/tag/danduheaders/" title="单独headers" target="_blank">单独headers</a><a href="/tag/fengzhuangdaima/" title="封装代码" target="_blank">封装代码</a><a href="/tag/tishicuowu/" title="提示错误" target="_blank">提示错误</a><a href="/tag/zhengshuzhengze/" title="整数正则" target="_blank">整数正则</a><a href="/tag/fei0kaitou/" title="非0开头" target="_blank">非0开头</a><a href="/tag/tiaoye/" title="跳页" target="_blank">跳页</a><a href="/tag/chuyema/" title="出页码" target="_blank">出页码</a><a href="/tag/antdtable/" title="antd table" target="_blank">antd table</a><a href="/tag/tishiURLweizhuce/" title="提示URL未注册" target="_blank">提示URL未注册</a><a href="/tag/gongzhonghaozhifu/" title="公众号支付" target="_blank">公众号支付</a><a href="/tag/vuehashmoshi/" title="vue hash模式" target="_blank">vue hash模式</a><a href="/tag/iSlider/" title="iSlider" target="_blank">iSlider</a><a href="/tag/chepaijianpan/" title="车牌键盘" target="_blank">车牌键盘</a><a href="/tag/xunhuantupian/" title="循环图片" target="_blank">循环图片</a><a href="/tag/echartsshuangzhexian/" title="echarts 双折线" target="_blank">echarts 双折</a><a href="/tag/zuoyoubuju/" title="左右布局" target="_blank">左右布局</a><a href="/tag/DllPlugin/" title="DllPlugin" target="_blank">DllPlugin</a><a href="/tag/duixiangchuangjian/" title="对象创建" target="_blank">对象创建</a><a href="/tag/daziyouxi/" title="打字游戏" target="_blank">打字游戏</a><a href="/tag/quanxuan/" title="圈选" target="_blank">圈选</a><a href="/tag/lianglan/" title="两栏" target="_blank">两栏</a><a href="/tag/yunhanshu/" title="云函数" target="_blank">云函数</a><a href="/tag/mengban/" title="蒙版" target="_blank">蒙版</a><a href="/tag/ES2020/" title="ES2020" target="_blank">ES2020</a><a href="/tag/chuchuang/" title="橱窗" target="_blank">橱窗</a><a href="/tag/wufenggundonglunbo/" title="无缝滚动轮播" target="_blank">无缝滚动轮播</a><a href="/tag/sekuaipengzhuang/" title="色块碰撞" target="_blank">色块碰撞</a><a href="/tag/zujianxiaohui/" title="组件销毁" target="_blank">组件销毁</a><a href="/tag/wendangcaozuo/" title="文档操作" target="_blank">文档操作</a></div> </div> </div> </div> <!-- row end --> <!-- row --> <div class="row row-sm"> <div class="col-sm-12 col-md-12 col-lg-12"> <div class="card"> <!-- f2er-rightads --> <ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-4605373693034661" data-ad-slot="7756441254" data-ad-format="auto" data-full-width-responsive="true"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> </div> </div> </div> <!-- row end --> </div> <!-- right end --> </div> </div> <footer id="footer"> <div class="container"> <div class="row hidden-xs"> <dl class="col-sm-6 site-link"> <dt>最近更新</dt><dd><a href="/win11/1005328.html" title="小米手机重装系统价格多少?专业维修服务详解" target="_blank">· 小米手机重装系统价格多少?专业维修服务详解</a><span class="text-muted pull-right">02-05</span></dd> <dd><a href="/win11/1005327.html" title="手把手教你重装电脑系统,让你的电脑焕然一新!" target="_blank">· 手把手教你重装电脑系统,让你的电脑焕然一新!</a><span class="text-muted pull-right">02-05</span></dd> <dd><a href="/win11/1005326.html" title="教你一步步重装XP系统,让你的电脑重获新生" target="_blank">· 教你一步步重装XP系统,让你的电脑重获新生</a><span class="text-muted pull-right">02-05</span></dd> <dd><a href="/win11/1005325.html" title="从备份到上网:一步步教你重装电脑系统" target="_blank">· 从备份到上网:一步步教你重装电脑系统</a><span class="text-muted pull-right">02-05</span></dd> <dd><a href="/win11/1005324.html" title="Sony笔记本电脑一键重装系统详细图文教程" target="_blank">· Sony笔记本电脑一键重装系统详细图文教程</a><span class="text-muted pull-right">02-05</span></dd> <dd><a href="/win11/1005323.html" title="Lenovo笔记本重装系统超详细教程,小白也能轻松上手" target="_blank">· Lenovo笔记本重装系统超详细教程,小白也能轻松...</a><span class="text-muted pull-right">02-05</span></dd> <dd><a href="/win11/1005322.html" title="联想笔记本一键重装Win10系统详细教程" target="_blank">· 联想笔记本一键重装Win10系统详细教程</a><span class="text-muted pull-right">02-05</span></dd> <dd><a href="/win11/1005321.html" title="电脑系统故障无需愁,专业维修店帮你重装旧貌换新颜" target="_blank">· 电脑系统故障无需愁,专业维修店帮你重装旧貌换新...</a><span class="text-muted pull-right">02-05</span></dd> <dd><a href="/win11/1005320.html" title="联想笔记本一键重装Win10系统图文教程,小白也能轻松搞定!" target="_blank">· 联想笔记本一键重装Win10系统图文教程,小白也能...</a><span class="text-muted pull-right">02-05</span></dd> <dd><a href="/win11/1005319.html" title="笔记本重装系统图文教程:从光盘启动一步到位" target="_blank">· 笔记本重装系统图文教程:从光盘启动一步到位</a><span class="text-muted pull-right">02-05</span></dd> </dl> <dl class="col-sm-4 site-link"> <dt>好站推荐</dt><dd> <a href="https://www.runoob.com" title="菜鸟教程(www.runoob.com)提供了编程的基础技术教程, 介绍了HTML、CSS、Javascript、Python,Java,Ruby,C,PHP , MySQL等各种编程语言的基础知识。 同时本站中也提供了大量的在线实例,通过实例,您可以更好的学习编程。" target="_blank">菜鸟教程</a></dd><dd> <a href="https://www.jb51.cc" title="编程之家(www.jb51.cc)是成立于2017年面向全球中文开发者的技术内容分享平台。提供编程导航、编程问答、编程博文、编程百科、编程教程、编程工具、编程实例等开发者最需要的编程技术内容与开发工具支持,与你一起学习编程,相信编程改变未来!" target="_blank">编程之家</a></dd><dd> <a href="" title="前端之家 f2er.com 前端开发人员所需学习知识手册。" target="_blank">前端之家</a></dd></dl> <dl class="col-sm-2 site-link"> <dt>商务合作</dt> <dd><a target="_blank" href="http://wpa.qq.com/msgrd?v=3&uin=76874919&site=qq&menu=yes">联系我们</a></dd> </dl> </div> <div class="copyright"> Copyright © 2019 前端之家. 当前版本 V7.0.16<br> <span class="ml5">前端之家 版权所有 <a href="https://beian.miit.gov.cn/" target="_blank" rel="nofollow">闽ICP备13020303号-10</a></span> </div> </div> </footer> <script type="text/javascript" src="/js/base.js"></script> </body> </html>