{"id":599,"date":"2016-06-16T22:35:41","date_gmt":"2016-06-16T14:35:41","guid":{"rendered":"http:\/\/www.xttblog.com\/?p=599"},"modified":"2016-06-16T22:35:41","modified_gmt":"2016-06-16T14:35:41","slug":"jquery3-0%e7%9a%84%e6%96%b0%e7%89%b9%e6%80%a7%e8%af%a6%e8%a7%a3","status":"publish","type":"post","link":"https:\/\/www.xttblog.com\/?p=599","title":{"rendered":"jQuery3.0\u7684\u65b0\u7279\u6027\u8be6\u89e3"},"content":{"rendered":"<blockquote><p>\n\t<span style=\"color:#800000\"><span style=\"font-size:16px\"><span style=\"font-family:comic sans ms,cursive\">jQuery\u662f\u7ee7prototype\u4e4b\u540e\u53c8\u4e00\u4e2a\u4f18\u79c0\u7684Javascript\u5e93\u3002\u5b83\u662f\u8f7b\u91cf\u7ea7\u7684js\u5e93 \uff0c\u5b83\u517c\u5bb9CSS3\uff0c\u8fd8\u517c\u5bb9\u5404\u79cd\u6d4f\u89c8\u5668\u3002\u4eba\u4eec\u5bf9jQuery\u7684\u4f9d\u8d56\u7a0b\u5ea6\uff0c\u8fdc\u8fdc\u8d85\u4e4e\u5927\u5bb6\u7684\u60f3\u8c61\u3002\u6211\u4eec\u5728\u505a\u4e00\u4e2a\u65b0\u9879\u76ee\u65f6\uff0c\u5f80\u5f80\u4e00\u884c\u4ee3\u7801\u8fd8\u6ca1\u5199\uff0cjQuery\u5c31\u88ab\u6dfb\u52a0\u8fdb\u6765\u4e86\u3002\u73b0\u5728\u7684Web\u524d\u7aef\u5f00\u53d1\uff0c\u4e0d\u4f1ajQuery\u7684\u4f30\u8ba1\u662f\u96f6\u5b58\u5728\u3002<\/span><\/span><\/span>\n<\/p><\/blockquote>\n<p>\n\t<span style=\"font-size:16px\"><span style=\"font-family:comic sans ms,cursive\"><u>jQuery\u81ea\u4ece\u53d1\u5e03\u540e\uff0c\u6df1\u53d7\u5927\u5bb6\u7684\u559c\u7231\u3002\u540e\u67650.x\u7248\u672c\uff0c1.x\u7248\u672c\uff0c2.x\u7248\u672c\uff0c\u76f8\u7ee7\u63a8\u51fa\uff0c\u529f\u80fd\u4e0d\u65ad\u589e\u52a0\u7684\u540c\u65f6\uff0c\u4e5f\u653e\u5f03\u4e86\u5bf9\u90e8\u5206\u6d4f\u89c8\u5668\u7684\u652f\u6301\u30022014\u5e74jQuery\u8fce\u6765\u4e86\u81ea\u5df1\u76843.x\u7248\u672c\u3002<\/u><br \/>\n\tjQuery API 3.0\u7248\u672c\u4e3b\u8981\u5305\u542b\u4ee5\u4e0b\u5185\u5bb9\uff1a<br \/>\n\t<span style=\"color:#000080\">\u5982\u679c\u4f60\u8981\u517c\u5bb9\u66f4\u5e7f\u6cdb\u7684\u6d4f\u89c8\u5668\uff0c\u5305\u62ecIE8\uff0cOpera 12\uff0cSafari 5\u7b49\uff0c\u4f7f\u7528jQuery-Compat 3.0.0\u5305\u3002\u6211\u4eec\u63a8\u8350\u5927\u591a\u6570\u7ad9\u70b9\u4f7f\u7528\u8fd9\u4e2a\u7248\u672c\uff0c\u56e0\u4e3a\u5b83\u4e3a\u6700\u591a\u7684\u7f51\u7ad9\u8bbf\u95ee\u8005\u63d0\u4f9b\u4e86\u6700\u4f73\u7684\u517c\u5bb9\u6027\u3002<br \/>\n\t\u5982\u679c\u4f60\u7684\u7f51\u7ad9\u662f\u4e13\u4e3a\u9886\u5148\u7684\u6d4f\u89c8\u5668\u642d\u5efa\u7684\uff0c\u6216\u8005\u662f\u4e00\u4e2awebview\uff08\u4f8b\u5982PhoneGap\u6216Cordova\uff09\u5bb9\u5668\u4e2d\u7684HTML\u5e94\u7528\uff0c\u5e76\u4e14\u4f60\u77e5\u9053\u54ea\u4e9b\u6d4f\u89c8\u5668\u5f15\u64ce\u4f1a\u4f7f\u7528\u5b83\uff0c\u90a3\u5c31\u4f7f\u7528jQuery 3.0.0\u5305\u3002<br \/>\n\t\u9664\u975e\u6211\u4eec\u5ba3\u5e03\uff0c\u5426\u5219\uff0c\u5728\u76f8\u540c\u7684\u4e3b\u6b21\u7248\u672c\u4e2d\u8fd9\u4e24\u4e2a\u5305\u5c06\u5305\u542b\u76f8\u4f3c\u7684\u516c\u4f17API\u3002\u8fd9\u6837\u5f00\u53d1\u8005\u53ef\u4ee5\u5f88\u5bb9\u6613\u5728\u5b83\u4eec\u4e4b\u95f4\u5207\u6362\uff0c\u5e76\u4e14\u4f1a\u4fdd\u6301\u4e0e\u7b2c\u4e09\u65b9jQuery\u63d2\u4ef6\u6700\u5927\u7684\u517c\u5bb9\u6027\u3002<br \/>\n\t\u6b64\u5916\uff0c 3.0\u8fd8\u589e\u52a0\u4e86\u5bf9 Yandex \u6d4f\u89c8\u5668\u7684\u652f\u6301\uff0c\u4e00\u6b3e\u6765\u81ea\u4fc4\u7f57\u65af\u7684\u6d4f\u89c8\u5668\u3002<\/span><br \/>\n\t<strong>1\u3001show\/hide<\/strong><br \/>\n\t&nbsp;&nbsp; &nbsp;\u4e4b\u524d\u7684show\/hide\u662f\u5927\u517c\u5bb9\uff0c\u6bd4\u5982show\uff0c \u65e0\u8bba\u5143\u7d20\u7684display\u662f\u5199\u5728style\uff0cstylesheet\u91cc\u90fd\u80fd\u663e\u793a\u51fa\u6765\u30023.0\u5219\u4e0d\u540c\u4e86\uff0c\u5199\u5728stylesheet\u91cc\u7684display:none\u8c03\u7528 show \u540e\u4ecd\u7136\u9690\u85cf\u3002 3.0\u5efa\u8bae\u91c7\u7528class\u65b9\u5f0f\u53bb\u663e\u793a\u9690\u85cf\uff0c\u6216\u8005\u5b8c\u5168\u91c7\u7528hide\u5148\u9690\u85cf\uff08\u4e0d\u4f7f\u7528css\u4ee3\u7801\uff09\uff0c\u518d\u8c03\u7528show\u4e5f\u53ef\u4ee5\u3002<br \/>\n\t<strong>2\u3001data\u65b9\u6cd5\u52a0\u5f3a<\/strong><br \/>\n\t&nbsp;&nbsp; &nbsp;jQuery 3.0 \u4e2d\u7684 Data \u662f\u5185\u90e8\u4f7f\u7528\u7684\uff0c\u5b9a\u4e49\u4e3a\u4e00\u4e2a&ldquo;\u7c7b&rdquo;\u3002\u4e00\u5171\u7528\u5b83\u521b\u5efa\u4e86\u4e24\u4e2a\u5bf9\u8c61\uff0cdataPriv \u548c dataUser\u3002Data \u6709 1 \u4e2a\u5bf9\u8c61\u5c5e\u6027(expando)\u548c\u7c7b\u5c5e\u6027(uid)\uff0c\u6709 6 \u4e2a\u65b9\u6cd5\uff0c\u5982\u4e0b<br \/>\n\t&nbsp;&nbsp; &nbsp;<img decoding=\"async\" alt=\"jQuery Data\" src=\"http:\/\/images2015.cnblogs.com\/blog\/114013\/201606\/114013-20160612181235636-500011821.png\" \/><br \/>\n\t&nbsp;&nbsp; <span style=\"color:#B22222\">&nbsp;\u4f8b\u5982\uff1ainput id=&quot;xttblog&quot; type=&quot;text&quot; value=&quot;&quot; data-name-11=&quot;aa&quot; \/&gt; 3.0 \u7248\u672c \u8f93\u51fa {&quot;name-11&quot;: aa}\uff0c \u4e4b\u524d\u7248\u672c\u8f93\u51fa {}<\/span><br \/>\n\t<strong>3\u3001derferred\u517c\u5bb9\u4e86Promise\/A+<\/strong><br \/>\n\t&nbsp;&nbsp; &nbsp;3.0\u7ec8\u4e8e\u53ef\u4ee5\u81ea\u4fe1\u7684\u5ba3\u544a\u652f\u6301Promise\/A \u4e86\uff0c\u4e4b\u524d\u4e00\u76f4\u88ab\u8bdf\u75c5\u662f\u9609\u5272\u7248\u7684\u3002<br \/>\n\t<strong>4\u3001$.ajax \u5bf9\u8c61\u5220\u9664\u4e86success|error|complete \u65b9\u6cd5<\/strong><br \/>\n\t&nbsp;&nbsp; &nbsp;\u8fd9\u662f\u56e0\u4e3aPromise\/A\u89c4\u8303\u7684\u63a8\u52a8\uff0c\u5927\u5bb6\u5bf9Promise\u7684\u4f7f\u7528\u8d8a\u6765\u8d8a\u591a\uff0c\u4e4b\u524d\u5bf9\u5e94Derferred\u4e0a\u7684\u51e0\u4e2a\u65b9\u6cd5\u6ca1\u6709\u5b58\u5728\u7684\u5fc5\u8981\u4e86<br \/>\n\t<strong>5\u3001width\/height\uff0ccss(width)\/css(height) \u7684\u8fd4\u56de\u503c\u4e00\u5f8b\u662f\u5341\u8fdb\u5236<\/strong><br \/>\n\t&nbsp;&nbsp; &nbsp;\u4e4b\u524d\u90e8\u5206\u6d4f\u89c8\u5668\u7279\u6b8a\u60c5\u51b5\u4e0b\u8fd4\u56de\u6d6e\u70b9\u6570\u3002<br \/>\n\t<strong>6\u3001 \u79fb\u9664\u4e86\u6ce8\u518c\u4e8b\u4ef6\u7684\u5feb\u6377\u51fd\u6570load|unload|error<\/strong><br \/>\n\t&nbsp;&nbsp; &nbsp;load\u540d\u79f0\u548cajax load\u540c\u540d\uff0c\u542b\u7cca\u4e0d\u6e05\u3002<br \/>\n\t&nbsp;&nbsp; &nbsp;unload\u5982\u679cload\u53bb\u6389\uff0c unload\u4e5f\u6ca1\u6709\u5b58\u5728\u7684\u610f\u4e49\u4e86\u3002<br \/>\n\t&nbsp;&nbsp; &nbsp;error\u91c7\u7528window.onerror\u6ce8\u518c\uff0c\u4e0d\u662f\u4e00\u4e2a\u6807\u51c6\u4e8b\u4ef6hander\uff0c\u56e0\u6b64\u4e5f\u5efa\u8bae\u79fb\u9664<br \/>\n\t<strong>7\u3001\u52a8\u753b\u6a21\u5757\u4f7f\u7528 &ldquo;requestAnimationFrame&rdquo; \u66ff\u4ee3setTimeout<\/strong><br \/>\n\t&nbsp;&nbsp; &nbsp;requestAnimationFrame IE9\u53caandroid4.4\u4ee5\u4e0b\u4ecd\u7136\u4e0d\u652f\u6301\uff0c\u4f46\u5176\u5b83\u6d4f\u89c8\u5668\u5219\u660e\u663e\u63d0\u5347\u6027\u80fd<br \/>\n\t<strong>\u7248\u6743\u58f0\u660e\uff1a\u672c\u6587\u4e3a\u535a\u4e3b\u539f\u521b\u6587\u7ae0\uff0c\u672a\u7ecf\u535a\u4e3b\u5141\u8bb8\u4e0d\u5f97\u8f6c\u8f7d\u3002<\/strong><\/span><\/span><\/p>\n<!-- <audio autoplay=\"autoplay\" height=\"100\" width=\"100\" hidden=\"true\"><source src=\"https:\/\/c.coka.la\/orAvPR.mp3\" type=\"audio\/mp3\"\/><\/audio><img decoding=\"async\" src=\"https:\/\/images.weserv.nl\/?url=https:\/\/ws3.sinaimg.cn\/large\/8fa5dcfcgy1g4em3rzar5j20ib089ae0.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/> --><p><!-- <img decoding=\"async\" src=\"https:\/\/raw.githubusercontent.com\/xmt1139057136\/xttblog\/master\/8fa5dcfcgy1g4em3rzar5j20ib089ae0.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/>--><img decoding=\"async\" src=\"https:\/\/saas.51autoparts.cn\/api\/admin\/sys-file\/oss\/file?fileName=84db51f8561e448f9a4fda2eff0811f9.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/><\/p><p>\u6700\u540e\uff0c\u6b22\u8fce\u5173\u6ce8\u6211\u7684\u4e2a\u4eba\u5fae\u4fe1\u516c\u4f17\u53f7\uff1a\u4e1a\u4f59\u8349\uff08yyucao\uff09\uff01<b>\u53ef\u52a0\u4f5c\u8005\u5fae\u4fe1\u53f7\uff1a<font color=\"red\">xttblog2<\/font>\u3002\u5907\u6ce8\uff1a\u201c1\u201d\uff0c\u6dfb\u52a0\u535a\u4e3b\u5fae\u4fe1\u62c9\u4f60\u8fdb\u5fae\u4fe1\u7fa4\u3002\u5907\u6ce8\u9519\u8bef\u4e0d\u4f1a\u540c\u610f\u597d\u53cb\u7533\u8bf7\u3002<\/b>\u518d\u6b21\u611f\u8c22\u60a8\u7684\u5173\u6ce8\uff01\u540e\u7eed\u6709\u7cbe\u5f69\u5185\u5bb9\u4f1a\u7b2c\u4e00\u65f6\u95f4\u53d1\u7ed9\u60a8\uff01\u539f\u521b\u6587\u7ae0\u6295\u7a3f\u8bf7\u53d1\u9001\u81f3532009913@qq.com\u90ae\u7bb1\u3002\u5546\u52a1\u5408\u4f5c\u4e5f\u53ef\u6dfb\u52a0\u4f5c\u8005\u5fae\u4fe1\u8fdb\u884c\u8054\u7cfb\uff01<\/p><p>\u672c\u6587\u539f\u6587\u51fa\u5904\uff1a<a href=\"https:\/\/www.xttblog.com\">\u4e1a\u4f59\u8349<\/a>\uff1a &raquo; <a href=\"https:\/\/www.xttblog.com\/?p=599\">jQuery3.0\u7684\u65b0\u7279\u6027\u8be6\u89e3<\/a><\/p><!-- <div class=\"bd-reward-stl\"><button id=\"bdRewardBtn\"><span><\/span><\/button><\/div> -->","protected":false},"excerpt":{"rendered":"<p>jQuery\u662f\u7ee7prototype\u4e4b\u540e\u53c8\u4e00\u4e2a\u4f18\u79c0\u7684Javascript\u5e93\u3002\u5b83\u662f\u8f7b\u91cf\u7ea7\u7684js\u5e93 \uff0c\u5b83\u517c\u5bb9CSS3 [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[49,361,362,360,363],"class_list":["post-599","post","type-post","status-publish","format-standard","hentry","category-html5","tag-jquery","tag-jquery-data","tag-jquery-compat","tag-jquery3-x","tag-requestanimationframe"],"_links":{"self":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/599","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=599"}],"version-history":[{"count":1,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/599\/revisions"}],"predecessor-version":[{"id":600,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/599\/revisions\/600"}],"wp:attachment":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=599"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=599"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=599"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}