{"id":210,"date":"2007-05-15T00:04:44","date_gmt":"2007-05-14T16:04:44","guid":{"rendered":"http:\/\/home.wangjianshuo.com\/wordpresscn\/20070515_cec.htm"},"modified":"2007-05-15T00:04:44","modified_gmt":"2007-05-14T16:04:44","slug":"cec","status":"publish","type":"post","link":"https:\/\/home.wangjianshuo.com\/cn\/20070515_cec.htm","title":{"rendered":"\u7528\u533f\u540d\u51fd\u6570\u907f\u514d\u547d\u540d\u51b2\u7a81"},"content":{"rendered":"<style>blockquote{color: #007000; font-family: \"bogus font here\", monospace;font-size: 100%; border: 1px solid silver; background-color: #f5f5f5;padding: 0.5em; overflow: auto; margin: 2em;}<\/style>\n<p><i>\u672c\u6587\u662f<a href=\"http:\/\/home.wangjianshuo.com\/cn\/20070514_googleloader_aece.htm\">google.loader \u4ee3\u7801\u6b23\u8d4f<\/a>\u7cfb\u5217\u7684\u7b2c\u4e8c\u90e8\u5206\u3002<\/i><\/p>\n<p>\u7b2c\u4e00\u4e2a\u532a\u5937\u6240\u601d\u7684\u5730\u65b9\uff0c\u53ef\u80fd\u5c31\u662f\u8fd9\u4e00\u6bb5\u4e86<\/p>\n<blockquote><p>if (!google.loader) {<br \/>\ngoogle.loader = {};<br \/>\ngoogle.loader.ServiceBase = &#8220;http:\/\/www.google.com\/uds&#8221;;<br \/>\ngoogle.loader.ApiKey = &#8220;internal&#8221;;<br \/>\ngoogle.loader.KeyVerified = true;<br \/>\ngoogle.loader.LoadFailure = false;<br \/>\ngoogle.loader.AdditionalParams = &#8220;&#8221;;<br \/>\n<strong style=\"color:red\">   (function() { <\/strong><br \/>\n\/\/\u5927\u91cf\u7684\u51fd\u6570\u5b9a\u4e49\uff0c\u53d8\u91cf\u58f0\u660e\u4ee5\u53ca\u51fd\u6570\u7684\u6267\u884c\uff08\u6574\u6574100\u591a\u884c\uff09<br \/>\n<strong style=\"color:red\">   })()<\/strong><br \/>\n}<\/p><\/blockquote>\n<p>\u57fa\u672c\u4e0a\u5c31\u662f\u8bf4\uff0c\u5b83\u5199\u4e86\u4e00\u4e2a\u8fd9\u6837\u7684\u8bed\u6cd5\uff1a<\/p>\n<blockquote><p>(function(){})()<\/p><\/blockquote>\n<p>\u5c31\u7b97\u662f\u770b\u5f97\u61c2\uff0c\u8fd9\u4e48\u7ed5\u6765\u7ed5\u53bb\uff0c\u9664\u4e86\u70ab\u8000\u4e4b\u5916\uff0c\u53c8\u6709\u610f\u4e49\u5462\uff1f<\/p>\n<p><b>\u533f\u540d\u51fd\u6570<\/b><\/p>\n<p>\u5148\u6487\u5f00Google\u7684\u4ee3\u7801\uff0c\u770b\u4e00\u4e0bJavaScript\u5176\u5b9e\u662f\u652f\u6301\u8fd9\u79cd\u5f62\u5f0f\u7684\u884c\u6570\u5b9a\u4e49\u7684\uff1a<\/p>\n<blockquote><p>function(msg){ alert(msg); }(&#8220;hello world&#8221;);<\/p><\/blockquote>\n<p>\u8fd9\u5176\u5b9e\u662f\u4e24\u6b65\uff1a\u7b2c\u4e00\u6b65\uff0c\u5b9a\u4e49\u4e86\u4e00\u4e2a\u51fd\u6570\uff0c\u76f8\u5f53\u4e8e\uff1a<\/p>\n<blockquote><p>var abc = function(msg) { alert(msg);}<\/p><\/blockquote>\n<p>\u7b2c\u4e8c\u6b65\uff0c\u7acb\u523b\u6267\u884c\u5b83\uff1a<\/p>\n<blockquote><p>abc(&#8220;hello world&#8221;);<\/p><\/blockquote>\n<p>\u628a\u4e24\u4e2a\u8bed\u53e5\u62fc\u63a5\u5728\u4e00\u8d77\uff0c\u7136\u540e\u53bb\u6389<code>abc<\/code>\u8fd9\u4e2a\u51fd\u6570\u7684\u540d\u5b57\uff0c\u5c31\u6210\u4e86\u73b0\u5728\u7684\u8bed\u6cd5\u5f62\u5f0f\u3002<\/p>\n<p>\u7ed3\u5408\u524d\u9762\u7684<\/p>\n<blockquote><p>\tgoogle.loader = {};<\/p><\/blockquote>\n<p>\u4e00\u8d77\u770b\uff0c\u5176\u5b9e\u5728\u8fd9\u91cc\u662f\u5b9a\u4e49\u4e86google.loader\u8fd9\u4e2a\u5bf9\u8c61\u7684\u4e00\u4e2a\u533f\u540d\u7684\u6210\u5458\u51fd\u6570\uff0c\u5e76\u4e14\u7acb\u523b\u6267\u884c\u4e86\u8fd9\u4e2a\u6210\u5458\u51fd\u6570\uff08\u5c31\u662f\u8bf4\u5b8c\u6210\u91cc\u9762\u7684\u4e00\u4e9b\u5217\u521d\u59cb\u5316\u7684\u65f6\u5019\u9700\u8981\u5e72\u7684\u4e8b\u60c5\uff09\u3002<\/p>\n<p><b>\u533f\u540d\u51fd\u6570\u7684\u7528\u5904<\/b><\/p>\n<p>\u867d\u7136\u53ef\u4ee5\u7406\u89e3\u8fd9\u91cc\u662f\u4e2a\u533f\u540d\u51fd\u6570\uff0c\u4f46\u662f\u4e3a\u4ec0\u4e48\u8981\u8fd9\u4e48\u505a\u5462\uff1f<\/p>\n<p>\u6211\u731c\u60f3\uff08\u8bf7\u6ce8\u610f\uff0c\u6240\u6709\u8fd9\u91cc\u60f3\u7684\u90fd\u662f\u4e00\u4e2a\u731c\u60f3\uff0c\u5e76\u4e14\u53ef\u80fd\u662f\u4f17\u591a\u539f\u56e0\u4e4b\u4e2d\u7684\u4e00\u79cd\u800c\u5df2\uff0c\u6b22\u8fce\u5927\u5bb6\u8865\u5145\uff09\uff0c\u6700\u4e3b\u8981\u7684\u8003\u8651\u662f\u907f\u514d\u547d\u540d\u51b2\u7a81\u3002<\/p>\n<p>\u56e0\u4e3a\u8fd9\u6bb5JavaScript\u4f5c\u4e3aGoogle\u7684\u5176\u4ed6\u7684\u5404\u9879\u670d\u52a1\u7684\u5165\u53e3\uff0c\u662f\u4f1a\u88ab\u5168\u7403\u5f88\u591a\u7684\u7f51\u9875\u5f15\u7528\u7684\u3002\u50cf\u4efb\u4f55\u7684JavaScript\u5f15\u7528\uff08\u5305\u62ecPHP\u7684\u5f15\u7528\uff09\uff0c\u5982\u679c\u88ab\u5f15\u7528\u7684\u4ee3\u7801\u548c\u5916\u9762\u7684\u4ee3\u7801\u4e00\u4e0d\u5c0f\u5fc3\u7528\u4e86\u540c\u6837\u7684\u540d\u5b57\uff0c\u5c31\u4e0d\u53ef\u907f\u514d\u7684\u53d1\u751f\u547d\u540d\u51b2\u7a81\u3002\u5bf9\u4e8e\u5c0f\u8303\u56f4\u7684\u4ee3\u7801\u6216\u8bb8\u8fd8\u53ef\u4ee5\u7528\u8d77\u5f88\u602a\u5f02\u7684\u540d\u5b57\u7684\u65b9\u6cd5\u4f01\u56fe\u907f\u514d\uff0c\u800c\u5bf9\u4e8eGoogle\u8fd9\u6837\u7684\u5e94\u7528\uff0c\u9760\u8fd0\u6c14\u5c31\u6709\u4e9b\u8bf4\u4e0d\u8fc7\u53bb\u3002\u5982\u679c\u662f\u4e00\u4e2a\u533f\u540d\u51fd\u6570\uff0c\u5916\u9762\u5c06\u6c38\u8fdc\u65e0\u6cd5\u76f4\u63a5\u8bbf\u95ee\u5b83\uff08\u603b\u4e0d\u80fd\u5199\u4e00\u4e2a\u8fd9\u6837\u7684\u4e00\u4e2a\u6ca1\u6709\u51fd\u6570\u540d\u7684\u8c03\u7528\u5427\uff1a<code>()<\/code>\uff09\u3002\u4ece\u8fd9\u4e00\u70b9\u6765\u8bf4\uff0c\u4e0d\u53ef\u80fd\u6709\u547d\u540d\u51b2\u7a81\u3002<\/p>\n<p><b>\u5c01\u88c5<\/b><\/p>\n<p>\u53e6\u5916\u7684\u4e00\u4e2a\u597d\u5904\uff0c\u6709\u53ef\u80fd\u662f\u4e3a\u4e86\u66f4\u597d\u7684\u5c01\u88c5\u3002\u6bd4\u5982\u5728\u8fd9\u4e2a\u51fd\u6570\u91cc\u9762\uff0c\u6709\u5f88\u591a\u7684\u51fd\u6570\u5b9a\u4e49\uff0c\u6bd4\u5982<\/p>\n<blockquote><p>q(); p(); m(); g(); i()<\/p><\/blockquote>\n<p>\u8fd8\u6709\u5927\u91cf\u7684\u53d8\u91cf\uff1a<\/p>\n<blockquote><p>var j; var h; var l;<\/p><\/blockquote>\n<p>\u7b49\u7b49\u3002\u5728JavaScript\u91cc\u9762\u6ca1\u6709\u7b80\u5355\u7684<code>private<\/code>\u8fd9\u6837\u7684\u5b9a\u4e49\u79c1\u6709\u51fd\u6570\u6216\u8005\u79c1\u6709\u51fd\u6570\u7684\u65b9\u6cd5\u3002\u5982\u679c\u8c03\u7528\u8005\u53ef\u4ee5\u968f\u5fc3\u6240\u6b32\u7684\u8bbf\u95ee\u5230\u8fd9\u4e9b\u4e2d\u95f4\u7684\uff08\u968f\u65f6\u53ef\u80fd\u53d8\u5316\uff0c\u751a\u81f3\u79fb\u9664\uff09\u6210\u5458\u3002\u5bf9\u4e8e\u8fd9\u4e48\u4e00\u4e2a\u5f00\u80a0\u7834\u809a\uff0c\u4e00\u89c8\u65e0\u4f59\u7684\u5bf9\u8c61\uff0c\u4ece\u4e00\u4e2aAPI\u63d0\u4f9b\u8005\u7684\u89d2\u5ea6\u6765\u770b\uff08\u548c\u4f7f\u7528\u8005\u7684\u89d2\u5ea6\u6765\u770b\uff09\uff0c\u7684\u786e\u662f\u4e2a\u633a\u6050\u6016\u7684\u4e8b\u60c5\u3002<\/p>\n<p>\u5982\u679c\u653e\u5728\u4e00\u4e2a\u533f\u540d\u7684\u51fd\u6570\u91cc\u9762\uff0c\u5916\u754c\u5c31\u518d\u4e5f\u6ca1\u6709\u529e\u6cd5\u76f4\u63a5\u8bbf\u95ee\u5230\u91cc\u9762\u7684\u51fd\u6570\u4e86\u3002\u5185\u90e8\u7684\u903b\u8f91\u88ab\u5b8c\u7f8e\u7684\u5c01\u88c5\u4e86\u8d77\u6765\u3002\u8fd9\u6837\u4e00\u6765\uff0c\u8fd9\u4e9b\u51fd\u6570\u548c\u53d8\u91cf\u591a\u4e48\u7684\u5b89\u5168\uff01<\/p>\n<p>\u5b89\u5168\u662f\u5b89\u5168\u4e86\uff0c\u4f46\u662f\u5b9a\u4e49\u4e86\u8fd9\u4e48\u591a\u7684\u51fd\u6570\uff0c\u4ec5\u4ec5\u662f\u4e3a\u4e86\u4e0d\u88ab\u5916\u754c\u8bbf\u95ee\u5417\uff1f\u663e\u7136\u4e0d\u662f\uff0c\u6240\u4ee5\u63a5\u4e0b\u6765\u8981\u505a\u7684\u4e8b\u60c5\uff0c\u5c31\u662f\u628a\u8fd9\u4e9b\u51fd\u6570\u8f93\u51fa\u51fa\u53bb\uff0c\u4e5f\u5c31\u662f<code>google_exportSymbol<\/code>\uff0c\u6216\u8005\u8bf4\u662f\u51fd\u6570<code>g()<\/code>\u8981\u505a\u7684\u4e8b\u60c5\u3002<\/p>\n<p>\u4e14\u542c\u4e0b\u56de\u5206\u89e3\u3002<\/p>\n<p>\u6ce8\uff1a\u63a5\u4e0b\u6765\uff0c\u6216\u8bb8\u8fd8\u8981\u8bf4\u8bf4\uff1a  \u8f93\u51fa\u51fd\u6570\u4f9b\u5f00\u53d1\u8005\u4f7f\u7528\uff0c  JavaScript\u4e2d\u7684\u9762\u5411\u5bf9\u8c61\uff0c  prototype\u7684\u6269\u5c55\u65b9\u5f0f\uff0c Undocumented\u7684\u795e\u79d8\u53c2\u6570\uff0c \u7f16\u8bd1\u540e\u7684JavaSscript\u597d\u6bd4\u6c47\u7f16\u8bed\u8a00\uff0c\u548c Symbol\u8868\u7684\u542f\u53d1\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u672c\u6587\u662fgoogle.loader \u4ee3\u7801\u6b23\u8d4f\u7cfb\u5217\u7684\u7b2c\u4e8c\u90e8\u5206\u3002 \u7b2c\u4e00\u4e2a\u532a\u5937\u6240\u601d\u7684\u5730\u65b9\uff0c\u53ef\u80fd\u5c31\u662f\u8fd9\u4e00\u6bb5\u4e86 if (! &hellip; <a href=\"https:\/\/home.wangjianshuo.com\/cn\/20070515_cec.htm\" class=\"more-link\">\u7ee7\u7eed\u9605\u8bfb<span class=\"screen-reader-text\">\u7528\u533f\u540d\u51fd\u6570\u907f\u514d\u547d\u540d\u51b2\u7a81<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[35],"tags":[],"_links":{"self":[{"href":"https:\/\/home.wangjianshuo.com\/cn\/wp-json\/wp\/v2\/posts\/210"}],"collection":[{"href":"https:\/\/home.wangjianshuo.com\/cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/home.wangjianshuo.com\/cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/home.wangjianshuo.com\/cn\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/home.wangjianshuo.com\/cn\/wp-json\/wp\/v2\/comments?post=210"}],"version-history":[{"count":0,"href":"https:\/\/home.wangjianshuo.com\/cn\/wp-json\/wp\/v2\/posts\/210\/revisions"}],"wp:attachment":[{"href":"https:\/\/home.wangjianshuo.com\/cn\/wp-json\/wp\/v2\/media?parent=210"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/home.wangjianshuo.com\/cn\/wp-json\/wp\/v2\/categories?post=210"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/home.wangjianshuo.com\/cn\/wp-json\/wp\/v2\/tags?post=210"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}