{"id":160410,"date":"2011-06-12T06:30:30","date_gmt":"2011-06-12T13:30:30","guid":{"rendered":"http:\/\/chinadigitaltimes.net\/chinese\/2011\/06\/%e9%98%ae%e4%b8%80%e5%b3%b0-bookmarklet%e7%bc%96%e5%86%99%e6%8c%87%e5%8d%97\/"},"modified":"2011-06-12T06:30:30","modified_gmt":"2011-06-12T13:30:30","slug":"%e9%98%ae%e4%b8%80%e5%b3%b0-bookmarklet%e7%bc%96%e5%86%99%e6%8c%87%e5%8d%97","status":"publish","type":"post","link":"https:\/\/chinadigitaltimes.net\/chinese\/160410.html","title":{"rendered":"\u962e\u4e00\u5cf0 | Bookmarklet\u7f16\u5199\u6307\u5357"},"content":{"rendered":"<p><p>\u524d\u4e00\u6bb5\u65e5\u5b50\uff0c\u6211\u5199\u4e86\u4e24\u4e2aBookmarklet&#8212;-&#8220;<a rel=\"nofollow noopener\" href=\"http:\/\/www.ruanyifeng.com\/blog\/2011\/01\/api_for_google_s_url_shortener.html\" target=\"_blank\">\u77ed\u7f51\u5740\u751f\u6210<\/a>&#8220;\u548c&#8221;<a rel=\"nofollow noopener\" href=\"http:\/\/www.ruanyifeng.com\/blog\/2011\/05\/bookmarklet_of_unshortening_url.html\" target=\"_blank\">\u77ed\u7f51\u5740\u8fd8\u539f<\/a>&#8220;\u3002<\/p>\n<p>\u5b83\u4eec\u7528\u8d77\u6765\u5f88\u65b9\u4fbf\uff0c\u9664\u4e86\u6211\u672c\u4eba\u4e4b\u5916\uff0c\u5176\u4ed6\u670b\u53cb\u4e5f\u5728\u7528\u3002\u7b2c\u4e00\u6b21\u53d1\u5e03Bookmarklet\uff0c\u5c31\u80fd\u6709\u7528\u6237\uff0c\u6211\u633a\u6ee1\u610f\u7684\u3002<\/p>\n<p><a rel=\"nofollow noopener\" href=\"http:\/\/www.ruanyifeng.com\/blog\/2011\/05\/bookmarklet_of_unshortening_url.html\" target=\"_blank\"><img decoding=\"async\" src=\"http:\/\/image.beekka.com\/blog\/201105\/bg2011052704.png\" \/><\/a><\/p>\n<p>\u4e0b\u9762\u5c31\u662f\u6211\u6574\u7406\u7684\u300aBookmarklet\u7f16\u5199\u6307\u5357\u300b\uff0c\u4f9b\u81ea\u5df1\u548c\u9700\u8981\u7684\u670b\u53cb\u53c2\u8003\u3002<\/p>\n<p>====================================================<\/p>\n<p><strong>Bookmarklet\u7f16\u5199\u6307\u5357<\/strong><\/p>\n<p>\u962e\u4e00\u5cf0 \u7f16\u5199<\/p>\n<p>\n<strong>\u4e00\u3001\u4ec0\u4e48\u662fBookmarklet\uff1f<\/strong><\/p>\n<p>Bookmarklet\u662f\u4e00\u4e2a\u590d\u5408\u8bcd\uff0c\u7531Bookmark\uff08\u4e66\u7b7e\uff09\u548c-let\uff08\u5c0f\u7684\uff09\u6784\u6210\uff0c\u4e2d\u6587\u53ef\u4ee5\u8bd1\u6210&#8221;\u4e66\u7b7e\u5de5\u5177&#8221;\u3002<\/p>\n<p>\u5b83\u5728\u5f62\u5f0f\u4e0a\u4e0e&#8221;\u4e66\u7b7e&#8221;\u4e00\u6837\uff0c\u90fd\u4fdd\u5b58\u5728\u6d4f\u89c8\u5668\u6536\u85cf\u5939\u91cc\u3002\u4f46\u662f\uff0c\u5b83\u4e0d\u662f\u4e00\u4e2a\u4ee5&#8221;http:\/\/&#8221;\u5f00\u5934\u7684\u7f51\u5740\uff0c\u800c\u662f\u4e00\u6bb5Javascript\u4ee3\u7801\uff0c\u4ee5&#8221;javascript:&#8221;\u5f00\u5934\u3002\u70b9\u51fb\u4e4b\u540e\uff0c\u4f1a\u5bf9\u5f53\u524d\u9875\u9762\u6267\u884c\u67d0\u79cd\u64cd\u4f5c\u3002<\/p>\n<p>\u5b83\u901a\u5e38\u5728\u7f51\u9875\u4e2d\u4ee5\u94fe\u63a5\u7684\u5f62\u5f0f\u51fa\u73b0\uff0c\u5c31\u50cf\u4e0b\u9762\u8fd9\u6837\uff1a<\/p>\n<blockquote>\n<p> <strong><a href=\"javascript:alert(&#39;hi&#39;);\">xxx<\/a><\/strong><\/p>\n<\/blockquote>\n<p>\u7528\u6237\u76f4\u63a5\u628a\u8fd9\u4e2a\u94fe\u63a5\u62d6\u5230\u5730\u5740\u680f\u6216\u6536\u85cf\u5939\u5c31\u53ef\u4ee5\u7528\u4e86\u3002<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/image.beekka.com\/blog\/201106\/bg2011061001.png\" \/><\/p>\n<p><strong>\u4e8c\u3001Bookmarklet\u7684\u4f18\u70b9<\/strong><\/p>\n<p>\u5b83\u6709\u51e0\u4e2a\u5f88\u663e\u8457\u7684\u4f18\u70b9\uff0c\u5176\u4ed6\u6280\u672f\u96be\u4ee5\u53d6\u4ee3\uff1a<\/p>\n<p><strong>1. \u5b89\u88c5\u5feb\u901f<\/strong><\/p>\n<p> Bookmarklet\u7684\u5b89\u88c5\uff0c\u5c31\u662f\u5728\u6536\u85cf\u5939\u4e2d\u4fdd\u5b58\u4e00\u6bb5\u4ee3\u7801\uff0c\u4e00\u6b65\u5c31\u80fd\u5b8c\u6210\u3002\u6240\u6709\u6d4f\u89c8\u5668\u90fd\u539f\u751f\u652f\u6301\u3002<\/p>\n<p><strong>2. \u4f7f\u7528\u65b9\u4fbf<\/strong><\/p>\n<p> \u7528\u7684\u65f6\u5019\uff0c\u70b9\u4e00\u4e0b\u8fd9\u4e2a\u94fe\u63a5\u5c31\u884c\u4e86\u3002<\/p>\n<p><strong>3. \u5f00\u53d1\u5bb9\u6613<\/strong><\/p>\n<p> \u4e00\u6bb5Javascript\u4ee3\u7801\u5c31\u662fBookmarklet\u7684\u6240\u6709\u5185\u5bb9\uff0c\u4e0d\u9700\u8981\u7528\u5230\u5176\u4ed6\u6280\u672f\uff0c\u6bd4\u5f00\u53d1\u4e00\u4e2a\u6d4f\u89c8\u5668\u63d2\u4ef6\u7b80\u5355\u591a\u4e86\u3002<\/p>\n<p><strong>4. \u8de8\u6d4f\u89c8\u5668<\/strong><\/p>\n<p> \u6240\u6709\u6d4f\u89c8\u5668\u90fd\u652f\u6301Bookmarklet\u3002\u5982\u679c\u5199\u7684\u6b63\u786e\uff0c\u540c\u6837\u4e00\u4e2aBookmarklet\u5728\u5404\u79cd\u6d4f\u89c8\u5668\u4e0a\u90fd\u80fd\u6b63\u5e38\u4f7f\u7528\u3002<\/p>\n<p><strong>\u4e09\u3001Bookmarklet\u7684\u7f16\u5199\u89c4\u5219<\/strong><\/p>\n<p><strong>1. \u5fc5\u987b\u4ee5&#8221;javascript:&#8221;\u5f00\u5934<\/strong><\/p>\n<p>\u6d4f\u89c8\u5668\u628a&#8221;javascript:&#8221;\u5f53\u505a\u534f\u8bae\u770b\u5f85\u3002\u6709\u4e86\u5b83\uff0c\u6d4f\u89c8\u5668\u624d\u77e5\u9053\u8981\u7528javascript\u89e3\u91ca\u540e\u9762\u7684\u4ee3\u7801\u3002\u5b83\u7684\u4f5c\u7528\u7b49\u540c\u4e8e\u5c06\u4ee3\u7801\u653e\u5728<script><\/script>\u4e4b\u95f4\u8fd0\u884c\u3002<\/p>\n<p><strong>2. \u6240\u6709\u4ee3\u7801\u5fc5\u987b\u5728\u540c\u4e00\u884c<\/strong><\/p>\n<p>\u56e0\u4e3a\u6d4f\u89c8\u5668\u628aBookmarklet\u5f53\u505a\u7f51\u5740\u4fdd\u5b58\uff0c\u800c\u7f51\u5740\u662f\u4e0d\u80fd\u5206\u884c\u7684\uff0c\u6240\u4ee5Bookmarklet\u4e5f\u4e0d\u80fd\u5206\u884c\u3002<\/p>\n<p>\u53e6\u4e00\u65b9\u9762\uff0c\u7f51\u5740\u662f\u6709\u957f\u5ea6\u9650\u5236\u7684\u3002\u5927\u591a\u6570\u6d4f\u89c8\u5668\u63a5\u53d7\u7684\u6700\u957f\u7f51\u5740\uff0c\u90fd\u57282000\u4e2a\u5b57\u7b26\u5de6\u53f3\uff0c\u53ea\u6709IE6\u662f488\u5b57\u7b26\u6216508\u5b57\u7b26\u3002\u8fd9\u4e5f\u5c31\u662fBookmarklet\u7684\u6700\u957f\u957f\u5ea6\u3002<a rel=\"nofollow noopener\" href=\"http:\/\/ted.mielczarek.org\/code\/mozilla\/bookmarklet.html\" target=\"_blank\">\u538b\u7f29\u5de5\u5177<\/a>\u53ef\u4ee5\u5e2e\u5fd9\u51cf\u5c11\u957f\u5ea6\uff0c\u4f46\u662f\u4f7f\u7528\u4e0b\u9762\u63d0\u5230\u7684\u8fde\u63a5\u5916\u90e8\u4ee3\u7801\u7684\u65b9\u6cd5\uff0c\u53ef\u4ee5\u907f\u5f00\u8fd9\u4e2a\u9650\u5236\u3002<\/p>\n<p><strong>3. \u4f7f\u7528\u5355\u5f15\u53f7<\/strong><\/p>\n<p>\u6839\u636eJavascript\u7684\u8bed\u6cd5\uff0c\u5355\u5f15\u53f7\uff08&#8217;xxx&#8217;\uff09\u548c\u53cc\u5f15\u53f7\uff08&#8221;xxx&#8221;\uff09\u90fd\u80fd\u4f7f\u7528\u3002\u4f46\u662f\u7531\u4e8ehtml\u8bed\u8a00\u4e3b\u8981\u4f7f\u7528\u53cc\u5f15\u53f7\uff0c\u6240\u4ee5Bookmarklet\u4f18\u5148\u4f7f\u7528\u5355\u5f15\u53f7\u3002\u4e07\u4e00\u9047\u5230\u5fc5\u987b\u4f7f\u7528\u53cc\u5f15\u53f7\u7684\u60c5\u51b5\uff0c\u5c31\u91c7\u7528\u5b83\u7684URL\u7f16\u7801\u5f62\u5f0f&#8221;%22&#8243;\u3002<\/p>\n<p><strong>4. \u4e0d\u8981\u6c61\u67d3\u5168\u5c40\u53d8\u91cf<\/strong><\/p>\n<p>Bookmarklet\u6700\u597d\u4e0d\u8981\u751f\u6210\u65b0\u7684\u5168\u5c40\u53d8\u91cf\uff0c\u53ef\u4ee5\u91c7\u7528\u76f4\u63a5\u8fd0\u884c\u533f\u540d\u51fd\u6570\u7684\u65b9\u5f0f\uff1a<\/p>\n<blockquote>\n<p> <strong>javascript: (function()&#8230;)();<\/strong><\/p>\n<\/blockquote>\n<p>\u4e0a\u9762\u5f0f\u5b50\u7684\u7b2c\u4e00\u4e2a\u62ec\u53f7\uff0c\u5b9a\u4e49\u4e86\u4e00\u4e2a\u533f\u540d\u51fd\u6570\uff1b\u6700\u540e\u4e00\u4e2a\u62ec\u53f7\u8868\u793a\u7acb\u5373\u6267\u884c\u8fd9\u4e2a\u533f\u540d\u51fd\u6570\u3002\u6240\u6709\u7684\u53d8\u91cf\u90fd\u662f\u533f\u540d\u51fd\u6570\u7684\u5185\u90e8\u53d8\u91cf\uff0c\u4e0d\u4f1a\u751f\u6210\u4efb\u4f55\u65b0\u7684\u5168\u5c40\u53d8\u91cf\u3002<\/p>\n<p>\u5982\u679c\u5fc5\u987b\u8bbe\u7f6e\u5168\u5c40\u53d8\u91cf\uff0c\u5c31\u53d6\u7f55\u89c1\u7684\u53d8\u91cf\u540d\uff08\u6bd4\u5982hd8ki2\uff09\uff0c\u9632\u6b62\u4e0e\u5df2\u7ecf\u5b58\u5728\u7684\u5168\u5c40\u53d8\u91cf\u540c\u540d\u3002<\/p>\n<p><strong>5. \u5bf9\u6587\u672c\u548cURL\u8fdb\u884c\u7f16\u7801<\/strong><\/p>\n<p>\u4e3a\u4e86\u9632\u6b62\u51fa\u73b0\u975e\u6cd5\u5b57\u7b26\uff0c\u4ee3\u7801\u4ee5\u5916\u7684\u6587\u672c\u90fd\u5e94\u8be5\u4f7f\u7528encodeURIComponent()\u51fd\u6570\u8fdb\u884c\u7f16\u7801\uff0c\u6bd4\u5982\u628a\u7a7a\u683c\u53d8\u6210%20\u3002<\/p>\n<p><strong>\u56db\u3001Bookmarklet\u7684\u7f16\u5199\u6280\u5de7<\/strong><\/p>\n<p><strong>1. \u83b7\u53d6\u7f51\u9875\u4fe1\u606f<\/strong><\/p>\n<p>\u83b7\u53d6\u5f53\u524d\u9875\u9762\u7684\u6807\u9898\uff1adocument.title\u3002<\/p>\n<p>\u83b7\u53d6\u5f53\u524d\u9875\u9762\u7684URL\uff1a location.href\u3002<\/p>\n<p>\u83b7\u53d6\u5f53\u524d\u9009\u4e2d\u7684\u6587\u672c\uff1a<\/p>\n<blockquote>\n<p> var t;<\/p>\n<p> t = (function()<\/p>\n<p> if (window.getSelection)<\/p>\n<p> return window.getSelection().toString();<\/p>\n<p> else if(document.getSelection)<\/p>\n<p> return document.getSelection();<\/p>\n<p> else if (document.selection)<\/p>\n<p> return document.selection.createRange().text;<\/p>\n<\/p>\n<p> return &#8221;;<\/p>\n<p> })();<\/p>\n<\/blockquote>\n<p><strong>2. \u9632\u6b62\u5237\u65b0\u9875\u9762<\/strong><\/p>\n<p>\u5982\u679c\u4ee3\u7801\u5bf9\u9875\u9762\u6709\u6539\u52a8\uff08\u6bd4\u5982\u4f7f\u7528\u4e86document.write\uff09\uff0c\u6d4f\u89c8\u5668\u5c31\u4f1a\u7528\u4e00\u4e2a\u65b0\u9875\u9762\u66ff\u6362\u539f\u6709\u9875\u9762\u3002\u6240\u4ee5\u6700\u597d\u7528void()\u547d\u4ee4\uff0c\u628a\u8bed\u53e5\u653e\u5728\u91cc\u9762\u3002<\/p>\n<p>\u4e3e\u4f8b\u6765\u8bf4\uff0c\u4e0b\u9762\u8fd9\u4e2aBookmarklet\u4f1a\u5bfc\u81f4\u539f\u9875\u9762\u88ab\u4e00\u4e2a\u65b0\u9875\u9762\u66ff\u4ee3\uff1a<\/p>\n<blockquote>\n<p> javascript:document.links[0].href=&#8217;http:\/\/www.ibm.com\/&#8217;;<\/p>\n<\/blockquote>\n<p>\u52a0\u4e0avoid\u4ee5\u540e\uff0c\u9875\u9762\u5c31\u4e0d\u4f1a\u8df3\u8f6c\u4e86\uff1a<\/p>\n<blockquote>\n<p> javascript:void(document.links[0].href=&#8217;http:\/\/www.ibm.com\/&#8217;);<\/p>\n<\/blockquote>\n<p><strong>3. \u6846\u67b6\uff08frameset\uff09<\/strong><\/p>\n<p>\u5bf9\u4e8e\u4f7f\u7528&#8221;\u6846\u67b6&#8221;\uff08frameset\uff09\u7684\u7f51\u9875\uff0c\u90a3\u4e9b\u9700\u8981\u64cd\u4f5c\u9875\u9762\u7684Bookmarklet\u4e00\u822c\u4e0d\u8d77\u4f5c\u7528\u3002\u6240\u4ee5\uff0c\u5982\u679c\u53d1\u73b0\u7f51\u9875\u4f7f\u7528\u4e86\u6846\u67b6\uff0c\u5c31\u544a\u8bc9\u7528\u6237Bookmarklet\u65e0\u6cd5\u4f7f\u7528\u3002<\/p>\n<blockquote>\n<p> if(frames.length > 0)<\/p>\n<p> alert(&#8216;\u5bf9\u4e0d\u8d77\uff0c\u4e0d\u9002\u7528\u4e8e\u6846\u67b6\u3002&#8217;);<\/p>\n<p> else<\/p>\n<p> \/* \u6b63\u5e38\u60c5\u51b5\u7684\u4ee3\u7801 *\/<\/p>\n<\/p>\n<\/blockquote>\n<p>\u4f46\u662f\uff0c\u4e0a\u9762\u7684\u4ee3\u7801\u6709\u4e00\u4e2a\u95ee\u9898\uff0c\u90a3\u5c31\u662f\u884c\u5185\u6846\u67b6iframe\u4e5f\u5305\u542b\u5728frames.length\u4e4b\u4e2d\uff0c\u6240\u4ee5\u5fc5\u987b\u6392\u9664iframe\u7684\u5f71\u54cd\u3002<\/p>\n<blockquote>\n<p> if(frames.length > <br \/> document.getElementsByTagName(&#8216;iframe&#8217;).length)<\/p>\n<p> alert(&#8216;\u5bf9\u4e0d\u8d77\uff0c\u4e0d\u9002\u7528\u4e8e\u6846\u67b6\u3002&#8217;);<\/p>\n<p> else<\/p>\n<p> \/* \u6b63\u5e38\u60c5\u51b5\u7684\u4ee3\u7801 *\/<\/p>\n<\/p>\n<\/blockquote>\n<p><strong>4. \u8fde\u63a5\u5916\u90e8javascript\u4ee3\u7801<\/strong><\/p>\n<p>\u6709\u65f6\uff0cBookmarklet\u5fc5\u987b\u518d\u5f15\u5165\u5916\u90e8\u7684Javascript\u4ee3\u7801\uff0c\u8fd9\u5c31\u9700\u8981\u4e3a\u5f53\u524d\u9875\u9762\u6dfb\u52a0\u4e00\u4e2ascript\u6807\u7b7e\u3002<\/p>\n<blockquote>\n<p> javascript:(function()<\/p>\n<p> var script=document.createElement(&#8216;script&#8217;);<\/p>\n<p> script.setAttribute(&#8216;src&#8217;,<br \/> &#8216;http:\/\/path\/to\/external\/file.js&#8217;); <\/p>\n<p> document.getElementsByTagName(&#8216;head&#8217;)[0] .appendChild(script);<\/p>\n<p> )();<\/p>\n<\/blockquote>\n<p><strong>5. \u6dfb\u52a0\u5916\u90e8\u51fd\u6570\u5e93<\/strong><\/p>\n<p>\u5982\u679cBookmarklet\u9700\u8981\u7528\u5230\u5916\u90e8\u51fd\u6570\u5e93\uff0c\u5c31\u5fc5\u987b\u628a\u5b83\u4e5f\u52a0\u8fdb\u6765\u3002\u4f46\u662f\uff0c\u524d\u63d0\u662f\u5fc5\u987b\u5148\u68c0\u67e5\u4e00\u4e0b\uff0c\u770b\u770b\u539f\u9875\u9762\u662f\u5426\u5df2\u7ecf\u52a0\u8f7d\u4e86\u8fd9\u4e2a\u51fd\u6570\u5e93\u3002<\/p>\n<p>\u4e0b\u9762\u4ee5\u52a0\u8f7djQuery\u4e3a\u4f8b\uff1a<\/p>\n<blockquote>\n<p> if (!window.jQuery)  <\/p>\n<p> script=document.createElement( &#8216;script&#8217; ); <\/p>\n<p> script.src=&#8217;http:\/\/ajax.googleapis.com\/<br \/> ajax\/libs\/jquery\/1\/jquery.min.js&#8217;; <\/p>\n<p> script.onload=foo; <\/p>\n<p> document.body.appendChild(script); <\/p>\n<p>  else <\/p>\n<p> foo(); <\/p>\n<p> function foo()  <\/p>\n<p> \/* &#8230; *\/<\/p>\n<\/p>\n<\/blockquote>\n<p><strong>\u4e94\u3001\u5ef6\u4f38\u9605\u8bfb<\/strong><\/p>\n<p> * Kalid Azad, <a rel=\"nofollow noopener\" href=\"http:\/\/betterexplained.com\/articles\/how-to-make-a-bookmarklet-for-your-web-application\/\" target=\"_blank\">How To Make a Bookmarklet For Your Web Application<\/a> <\/p>\n<p> * Troels Jakobsen, <a rel=\"nofollow noopener\" href=\"http:\/\/subsimple.com\/bookmarklets\/rules.asphttp:\/\/subsimple.com\/bookmarklets\/rules.asp\" target=\"_blank\">Rules for Bookmarklets<\/a> <\/p>\n<p> * Troels Jakobsen, <a rel=\"nofollow noopener\" href=\"http:\/\/subsimple.com\/bookmarklets\/tips.asp\" target=\"_blank\">Tips for Writing Bookmarklets<\/a><\/p>\n<p> * Siddharth, <a rel=\"nofollow noopener\" href=\"http:\/\/net.tutsplus.com\/tutorials\/javascript-ajax\/create-bookmarklets-the-right-way\/\" target=\"_blank\">Create Bookmarklets &#8211; The Right Way<\/a><\/p>\n<p>\uff08\u5b8c\uff09\n<\/p>\n<div>\n<h3>\u6587\u6863\u4fe1\u606f<\/h3>\n<ul>\n<li>\u7248\u6743\u58f0\u660e\uff1a\u81ea\u7531\u8f6c\u8f7d-\u975e\u5546\u7528-\u975e\u884d\u751f-\u4fdd\u6301\u7f72\u540d | <a rel=\"nofollow noopener\" href=\"http:\/\/creativecommons.org\/licenses\/by-nc-nd\/3.0\/deed.zh\" target=\"_blank\">Creative Commons BY-NC-ND 3.0<\/a><\/li>\n<li>\u539f\u6587\u7f51\u5740\uff1a<a rel=\"nofollow noopener\" href=\"http:\/\/www.ruanyifeng.com\/blog\/2011\/06\/a_guide_for_writing_bookmarklet.html\" target=\"_blank\">http:\/\/www.ruanyifeng.com\/blog\/2011\/06\/a_guide_for_writing_bookmarklet.html<\/a><\/li>\n<li>\u6700\u540e\u4fee\u6539\u65f6\u95f4\uff1a2011\u5e746\u670811\u65e5 00:47<\/li>\n<li>\u4ed8\u8d39\u652f\u6301\uff08<a rel=\"nofollow noopener\" href=\"http:\/\/www.ruanyifeng.com\/blog\/2011\/05\/my_google_adsense_is_disabled.html\" target=\"_blank\">\u8bf4\u660e<\/a>\uff09\uff1a<a rel=\"nofollow noopener\" href=\"https:\/\/lab.alipay.com\/p.htm?id=2011051700196144\" target=\"_blank\"><img decoding=\"async\" alt=\"\u652f\u4ed8\u5b9d\u62c5\u4fdd\u4ea4\u6613\" src=\"http:\/\/chinadigitaltimes.net\/chinese\/files\/2011\/06\/3a976ef2rmb_32.png.png\" \/><\/a> | <a rel=\"nofollow noopener\" href=\"https:\/\/www.paypal.com\/cgi-bin\/webscr?cmd=_xclick&#038;business=yifeng.ruan@gmail.com&#038;currency_code=USD&#038;amount=0.3&#038;return=http:\/\/www.ruanyifeng.com\/thank.html&#038;item_name=Ruan%20YiFeng&#039;s%20Blog&#038;undefined_quantity=1&#038;no_note=0\" target=\"_blank\"><img decoding=\"async\" alt=\"paypal\" src=\"http:\/\/chinadigitaltimes.net\/chinese\/files\/2011\/06\/5ca83e43dollar_32.png.png\" \/><\/a> <\/li>\n<\/ul>\n<\/div>\n<p><img decoding=\"async\" src=\"http:\/\/chinadigitaltimes.net\/chinese\/files\/2011\/06\/981fcb61g2011052704.png-150x150.png\" \/><\/p>\n<p><small>\u672c\u6587\u7531\u81ea\u52a8\u805a\u5408\u7a0b\u5e8f\u53d6\u81ea\u7f51\u7edc\uff0c\u5185\u5bb9\u548c\u89c2\u70b9\u4e0d\u4ee3\u8868\u6570\u5b57\u65f6\u4ee3\u7acb\u573a<\/small><\/p>\n<form method=\"POST\" action=\"http:\/\/www.feedblitz.com\/f\/f.fbz?AddNewUserDirect\">\n\u5b9a\u671f\u83b7\u5f97\u7ffb\u5899\u4fe1\u606f\uff1f<a href=\"http:\/\/www.feedblitz.com\/f\/?Sub=738338\" target=\"_blank\" rel=\"noopener\">\u8bf7\u7535\u90ae\u8ba2\u9605\u6570\u5b57\u65f6\u4ee3<\/a> <br \/><input name=\"EMAIL\" maxlength=\"64\" type=\"text\" size=\"25\" value=\"\"><br \/>\n<input name=\"FEEDID\" type=\"hidden\" value=\"738338\"><br \/>\n<input name=\"PUBLISHER\" type=\"hidden\" value=\"7485568\"><br \/>\n<input type=\"submit\" value=\"\u8ba2\u9605!\"><br \/>\n<\/form>\n","protected":false},"excerpt":{"rendered":"<p> \u524d\u4e00\u6bb5\u65e5\u5b50\uff0c\u6211\u5199\u4e86\u4e24\u4e2aBookmarklet&#8212;-&#8221; \u77ed\u7f51\u5740\u751f\u6210 &#8220;\u548c&#8221; \u77ed\u7f51\u5740\u8fd8\u539f &#8220;\u3002 \u5b83\u4eec\u7528\u8d77\u6765\u5f88\u65b9\u4fbf\uff0c\u9664\u4e86\u6211\u672c\u4eba\u4e4b\u5916\uff0c\u5176\u4ed6\u670b\u53cb\u4e5f\u5728\u7528\u3002\u7b2c\u4e00\u6b21\u53d1\u5e03Bookmarklet\uff0c\u5c31\u80fd\u6709\u7528\u6237\uff0c\u6211\u633a\u6ee1\u610f\u7684\u3002 \u4e0b\u9762\u5c31\u662f\u6211\u6574\u7406\u7684\u300aBookmarklet\u7f16\u5199\u6307\u5357\u300b\uff0c\u4f9b\u81ea\u5df1\u548c\u9700\u8981\u7684\u670b\u53cb\u53c2\u8003\u3002 ==================================================== Bookmarklet\u7f16\u5199\u6307\u5357 \u962e\u4e00\u5cf0 \u7f16\u5199 \u4e00\u3001\u4ec0\u4e48\u662fBookmarklet\uff1f Bookmarklet\u662f\u4e00\u4e2a\u590d\u5408\u8bcd\uff0c\u7531Bookmark\uff08\u4e66\u7b7e\uff09\u548c-let\uff08\u5c0f\u7684\uff09\u6784\u6210\uff0c\u4e2d\u6587\u53ef\u4ee5\u8bd1\u6210&#8221;\u4e66\u7b7e\u5de5\u5177&#8221;\u3002 \u5b83\u5728\u5f62\u5f0f\u4e0a\u4e0e&#8221;\u4e66\u7b7e&#8221;\u4e00\u6837\uff0c\u90fd\u4fdd\u5b58\u5728\u6d4f\u89c8\u5668\u6536\u85cf\u5939\u91cc\u3002\u4f46\u662f\uff0c\u5b83\u4e0d\u662f\u4e00\u4e2a\u4ee5&#8221;http:\/\/&#8221;\u5f00\u5934\u7684\u7f51\u5740\uff0c\u800c\u662f\u4e00\u6bb5Javascript\u4ee3\u7801\uff0c\u4ee5&#8221;javascript:&#8221;\u5f00\u5934\u3002\u70b9\u51fb\u4e4b\u540e\uff0c\u4f1a\u5bf9\u5f53\u524d\u9875\u9762\u6267\u884c\u67d0\u79cd\u64cd\u4f5c\u3002 \u5b83\u901a\u5e38\u5728\u7f51\u9875\u4e2d\u4ee5\u94fe\u63a5\u7684\u5f62\u5f0f\u51fa\u73b0\uff0c\u5c31\u50cf\u4e0b\u9762\u8fd9\u6837\uff1a xxx \u7528\u6237\u76f4\u63a5\u628a\u8fd9\u4e2a\u94fe\u63a5\u62d6\u5230\u5730\u5740\u680f\u6216\u6536\u85cf\u5939\u5c31\u53ef\u4ee5\u7528\u4e86\u3002 \u4e8c\u3001Bookmarklet\u7684\u4f18\u70b9 \u5b83\u6709\u51e0\u4e2a\u5f88\u663e\u8457\u7684\u4f18\u70b9\uff0c\u5176\u4ed6\u6280\u672f\u96be\u4ee5\u53d6\u4ee3\uff1a 1. \u5b89\u88c5\u5feb\u901f Bookmarklet\u7684\u5b89\u88c5\uff0c\u5c31\u662f\u5728\u6536\u85cf\u5939\u4e2d\u4fdd\u5b58\u4e00\u6bb5\u4ee3\u7801\uff0c\u4e00\u6b65\u5c31\u80fd\u5b8c\u6210\u3002\u6240\u6709\u6d4f\u89c8\u5668\u90fd\u539f\u751f\u652f\u6301\u3002 2. \u4f7f\u7528\u65b9\u4fbf \u7528\u7684\u65f6\u5019\uff0c\u70b9\u4e00\u4e0b\u8fd9\u4e2a\u94fe\u63a5\u5c31\u884c\u4e86\u3002 3. \u5f00\u53d1\u5bb9\u6613 \u4e00\u6bb5Javascript\u4ee3\u7801\u5c31\u662fBookmarklet\u7684\u6240\u6709\u5185\u5bb9\uff0c\u4e0d\u9700\u8981\u7528\u5230\u5176\u4ed6\u6280\u672f\uff0c\u6bd4\u5f00\u53d1\u4e00\u4e2a\u6d4f\u89c8\u5668\u63d2\u4ef6\u7b80\u5355\u591a\u4e86\u3002 4. \u8de8\u6d4f\u89c8\u5668 \u6240\u6709\u6d4f\u89c8\u5668\u90fd\u652f\u6301Bookmarklet\u3002\u5982\u679c\u5199\u7684\u6b63\u786e\uff0c\u540c\u6837\u4e00\u4e2aBookmarklet\u5728\u5404\u79cd\u6d4f\u89c8\u5668\u4e0a\u90fd\u80fd\u6b63\u5e38\u4f7f\u7528\u3002 \u4e09\u3001Bookmarklet\u7684\u7f16\u5199\u89c4\u5219 1<\/p>\n","protected":false},"author":762,"featured_media":160411,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"","_et_pb_old_content":"","_et_gb_content_width":"","ampforwp-amp-on-off":"","home_featured":"","footnotes":"","_links_to":"","_links_to_target":""},"categories":[9203],"tags":[9400],"class_list":["post-160410","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blogs","tag-9400","et-has-post-format-content","et_post_format-et-post-format-standard"],"_links":{"self":[{"href":"https:\/\/chinadigitaltimes.net\/chinese\/wp-json\/wp\/v2\/posts\/160410","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/chinadigitaltimes.net\/chinese\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/chinadigitaltimes.net\/chinese\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/chinadigitaltimes.net\/chinese\/wp-json\/wp\/v2\/users\/762"}],"replies":[{"embeddable":true,"href":"https:\/\/chinadigitaltimes.net\/chinese\/wp-json\/wp\/v2\/comments?post=160410"}],"version-history":[{"count":0,"href":"https:\/\/chinadigitaltimes.net\/chinese\/wp-json\/wp\/v2\/posts\/160410\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/chinadigitaltimes.net\/chinese\/wp-json\/wp\/v2\/media\/160411"}],"wp:attachment":[{"href":"https:\/\/chinadigitaltimes.net\/chinese\/wp-json\/wp\/v2\/media?parent=160410"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/chinadigitaltimes.net\/chinese\/wp-json\/wp\/v2\/categories?post=160410"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/chinadigitaltimes.net\/chinese\/wp-json\/wp\/v2\/tags?post=160410"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}