{"id":293,"date":"2016-03-18T15:37:31","date_gmt":"2016-03-18T07:37:31","guid":{"rendered":"http:\/\/www.xttblog.com\/?p=293"},"modified":"2016-03-18T15:37:31","modified_gmt":"2016-03-18T07:37:31","slug":"%e4%bd%bf%e7%94%a8html5%e5%ae%9e%e7%8e%b0%e4%b8%8a%e4%bc%a0%e5%9b%be%e7%89%87%e9%a2%84%e8%a7%88%e5%8a%9f%e8%83%bd","status":"publish","type":"post","link":"https:\/\/www.xttblog.com\/?p=293","title":{"rendered":"\u4f7f\u7528HTML5\u5b9e\u73b0\u4e0a\u4f20\u56fe\u7247\u9884\u89c8\u529f\u80fd"},"content":{"rendered":"<p>\n\t\u8fd9\u5728\u4ee5\u524d\uff0c\u60f3\u8981web\u5b9e\u73b0\u4e0a\u4f20\u56fe\u7247\u65f6\u8fdb\u884c\u9884\u89c8\u662f\u5f88\u56f0\u96be\u7684\u3002\u4e3b\u8981\u4e5f\u662f\u501f\u52a9\u4e00\u4e9b\u63d2\u4ef6\uff0cflash\u7b49\u53bb\u5b9e\u73b0\u3002\u6709\u7684\u505a\u6cd5\u662f\u5728\u9009\u62e9\u56fe\u7247\u540e\uff0c\u7acb\u523b\u4e0a\u4f20\uff0c\u518d\u5c06\u56fe\u7247\u5c55\u73b0\u51fa\u6765\uff0c\u505a\u5230\u9884\u89c8\u6548\u679c\uff1b\u5982\u679c\u4e0a\u4f20\u8005\u4e0d\u6ee1\u610f\u6216\u8005\u9009\u9519\u4e86\uff0c\u91cd\u65b0\u4e0a\u4f20\uff0c\u5219\u8fd8\u9700\u8981\u5220\u9664\u539f\u6765\u7684\u3002\u770b\u8d77\u6765\u8981\u505a\u5230\u56fe\u7247\u9884\u89c8\u662f\u975e\u5e38\u9ebb\u70e6\u7684\u3002<br \/>\n\t\u4f46\u662f\u5728html5\u6765\u4e34\u4e4b\u540e\uff0c\u8fd9\u4e00\u5207\u95ee\u9898\u90fd\u662f\u53d8\u5f97\u90a3\u4e48\u7684\u7b80\u5355\u4e86\u3002\u5148\u770b\u770b\u6211\u7684\u6548\u679c\u56fe\u5427\uff1a\n<\/p>\n<p>\n\t<img decoding=\"async\" src=\"http:\/\/www.xttblog.com\/wp-content\/uploads\/2016\/03\/b.png\" \/>\n<\/p>\n<p>\n\t\u6e90\u4ee3\u7801\u5982\u4e0b\uff1a\n<\/p>\n<pre>\r\n&lt;!DOCTYPE html&gt;\r\n&lt;html&gt;\r\n\t&lt;head&gt;\r\n\t\t&lt;meta charset=&quot;utf-8&quot;&gt;\r\n\t\t&lt;title&gt;\u4f7f\u7528HTML5\u5b9e\u73b0\u4e0a\u4f20\u56fe\u7247\u9884\u89c8\u529f\u80fd&lt;\/title&gt;\r\n\t\t&lt;script src=&quot;http:\/\/cdn.bootcss.com\/jquery\/1.11.1\/jquery.min.js&quot;&gt;&lt;\/script&gt;\r\n\t\t&lt;style type=&quot;text\/css&quot;&gt;\r\n\t\t\t.imgbox,.imgbox1{\r\n\t\t\t\tfloat: left;\r\n\t\t\t\tmargin-right: 20px;\t\r\n\t\t\t\tmargin-top: 20px;\r\n\t\t\t\tposition: relative;\r\n\t\t\t\twidth: 182px;\r\n\t\t\t\theight: 142px;\r\n\t\t\t\tborder: 1px solid red;\r\n\t\t\t\toverflow: hidden;\r\n\t\t\t}\r\n\t\t\t.imgbox1{border: 1px solid blue;}\r\n\t\t\t.imgnum{\r\n\t\t\t\tleft: 0px;\r\n\t\t\t\ttop: 0px;\r\n\t\t\t\tmargin: 0px;\r\n\t\t\t\tpadding: 0px;\r\n\t\t\t}\r\n\t\t\t.imgnum input,.imgnum1 input {\r\n\t\t\t\tposition: absolute;\r\n\t\t\t\twidth: 182px;\r\n\t\t\t\theight: 142px;\r\n\t\t\t\topacity: 0;\r\n\t\t\t}\r\n\t\t\t.imgnum img,.imgnum1 img {\r\n\t\t\t\twidth: 100%;\r\n\t\t\t\theight: 100%;\r\n\t\t\t}\r\n\t\t\t.close,.close1 {\r\n\t\t\t\tcolor: red;\r\n\t\t\t\tposition: absolute;\r\n\t\t\t\tleft: 170px;\r\n\t\t\t\ttop: 0px;\r\n\t\t\t\tdisplay: none;\r\n\t\t\t}\r\n\t\t&lt;\/style&gt;\r\n\t&lt;\/head&gt;\r\n\t&lt;body&gt;\r\n\t\t&lt;div class=&quot;imgbox&quot;&gt;\r\n\t\t\t&lt;div class=&quot;imgnum&quot;&gt;\r\n\t\t\t\t&lt;input type=&quot;file&quot; class=&quot;filepath&quot; \/&gt;\r\n\t\t\t\t&lt;span class=&quot;close&quot;&gt;X&lt;\/span&gt;\r\n\t\t\t\t&lt;img src=&quot;btn.png&quot; class=&quot;img1&quot; \/&gt;\r\n\t\t\t\t&lt;img src=&quot;&quot; class=&quot;img2&quot; \/&gt;\r\n\t\t\t&lt;\/div&gt;\r\n\t\t&lt;\/div&gt;\r\n\t\t&lt;div class=&quot;imgbox&quot;&gt;\r\n\t\t\t&lt;div class=&quot;imgnum&quot;&gt;\r\n\t\t\t\t&lt;input type=&quot;file&quot; class=&quot;filepath&quot; \/&gt;\r\n\t\t\t\t&lt;span class=&quot;close&quot;&gt;X&lt;\/span&gt;\r\n\t\t\t\t&lt;img src=&quot;btn.png&quot; class=&quot;img1&quot; \/&gt;\r\n\t\t\t\t&lt;img src=&quot;&quot; class=&quot;img2&quot; \/&gt;\r\n\t\t\t&lt;\/div&gt;\r\n\t\t&lt;\/div&gt;\r\n\t\t&lt;div class=&quot;imgbox1&quot;&gt;\r\n\t\t\t&lt;div class=&quot;imgnum&quot;&gt;\r\n\t\t\t\t&lt;input type=&quot;file&quot; class=&quot;filepath1&quot; \/&gt;\r\n\t\t\t\t&lt;span class=&quot;close1&quot;&gt;X&lt;\/span&gt;\r\n\t\t\t\t&lt;img src=&quot;btn.png&quot; class=&quot;img11&quot; \/&gt;\r\n\t\t\t\t&lt;img src=&quot;&quot; class=&quot;img22&quot; \/&gt;\r\n\t\t\t&lt;\/div&gt;\r\n\t\t&lt;\/div&gt;\r\n\t\t\r\n\t\t\r\n\t&lt;\/body&gt;\r\n\t&lt;script type=&quot;text\/javascript&quot;&gt;\r\n\t\t$(function() {\r\n\t\t\t$(&quot;.filepath&quot;).on(&quot;change&quot;,function() {\r\n\t\t\t\tvar srcs = getObjectURL(this.files[0]);   \/\/\u83b7\u53d6\u8def\u5f84\r\n\t\t\t\t$(this).nextAll(&quot;.img1&quot;).hide();   \/\/this\u6307\u7684\u662finput\r\n\t\t\t\t$(this).nextAll(&quot;.img2&quot;).show();  \/\/fireBUg\u67e5\u770b\u7b2c\u4e8c\u6b21\u6362\u56fe\u7247\u4e0d\u8d77\u505a\u7528\r\n\t\t\t\t$(this).nextAll(&#039;.close&#039;).show();   \/\/this\u6307\u7684\u662finput\r\n\t\t\t\t$(this).nextAll(&quot;.img2&quot;).attr(&quot;src&quot;,srcs);    \/\/this\u6307\u7684\u662finput\r\n\t\t\t\t$(&quot;.close&quot;).on(&quot;click&quot;,function() {\r\n\t\t\t\t\t $(this).hide();     \/\/this\u6307\u7684\u662fspan\r\n\t\t\t\t\t $(this).nextAll(&quot;.img2&quot;).hide();\r\n\t\t\t\t\t $(this).nextAll(&quot;.img1&quot;).show(); \r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t});\r\n\t\t\r\n\t\tfunction getObjectURL(file) {\r\n\t\t\tvar url = null;\r\n\t\t\tif (window.createObjectURL != undefined) {\r\n\t\t\t\turl = window.createObjectURL(file)\r\n\t\t\t} else if (window.URL != undefined) {\r\n\t\t\t\turl = window.URL.createObjectURL(file)\r\n\t\t\t} else if (window.webkitURL != undefined) {\r\n\t\t\t\turl = window.webkitURL.createObjectURL(file)\r\n\t\t\t}\r\n\t\t\treturn url\r\n\t\t}\r\n\t\t\r\n\t    $(function() {\r\n\t\t\t$(&quot;.filepath1&quot;).on(&quot;change&quot;,function() {\r\n\t\t\t\tvar srcs = getObjectURL(this.files[0]);\/\/\u83b7\u53d6\u8def\u5f84\r\n\t\t\t\tvar htmlImg=&#039;&lt;div class=&quot;imgbox1&quot;&gt;&#039;+\r\n\t\t\t\t\t\t  &#039;&lt;div class=&quot;imgnum1&quot;&gt;&#039;+\r\n\t\t\t\t\t\t  &#039;&lt;input type=&quot;file&quot; class=&quot;filepath1&quot; \/&gt;&#039;+\r\n\t\t\t\t\t\t  &#039;&lt;span class=&quot;close1&quot;&gt;X&lt;\/span&gt;&#039;+\r\n\t\t\t\t\t\t  &#039;&lt;img src=&quot;btn.png&quot; class=&quot;img11&quot; \/&gt;&#039;+\r\n\t\t\t\t\t\t  &#039;&lt;img src=&quot;&#039;+srcs+&#039;&quot; class=&quot;img22&quot; \/&gt;&#039;+\r\n\t\t\t\t\t\t  &#039;&lt;\/div&gt;&#039;+\r\n\t\t\t\t\t\t  &#039;&lt;\/div&gt;&#039;;\r\n\t\t\t\t$(this).parent().parent().before(htmlImg);\r\n\t\t\t\t$(this).parent().parent().prev().find(&quot;.img11&quot;).hide();\r\n\t\t\t\t$(this).parent().parent().prev().find(&#039;.close1&#039;).show(); \r\n\t\t\t\t$(&quot;.close1&quot;).on(&quot;click&quot;,function() {\r\n\t\t\t\t\t $(this).hide();\r\n\t\t\t\t\t $(this).nextAll(&quot;.img22&quot;).hide();\r\n\t\t\t\t\t $(this).nextAll(&quot;.img11&quot;).show(); \r\n\t\t\t\t\t if($(&#039;.imgbox1&#039;).length&gt;1){\r\n\t\t\t\t\t\t$(this).parent().parent().remove();\r\n\t\t\t\t\t }\r\n\t\t\t\t})\r\n\t\t\t});\r\n\t\t});\r\n\t&lt;\/script&gt;\r\n&lt;\/html&gt;\r\n<\/pre>\n<p>\n\t\u539f\u6587\u5730\u5740\uff1a<a href=\"http:\/\/www.xttblog.com\/?p=293\" target=\"_blank\">http:\/\/www.xttblog.com\/?p=293<\/a><\/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=293\">\u4f7f\u7528HTML5\u5b9e\u73b0\u4e0a\u4f20\u56fe\u7247\u9884\u89c8\u529f\u80fd<\/a><\/p><!-- <div class=\"bd-reward-stl\"><button id=\"bdRewardBtn\"><span><\/span><\/button><\/div> -->","protected":false},"excerpt":{"rendered":"<p>\u8fd9\u5728\u4ee5\u524d\uff0c\u60f3\u8981web\u5b9e\u73b0\u4e0a\u4f20\u56fe\u7247\u65f6\u8fdb\u884c\u9884\u89c8\u662f\u5f88\u56f0\u96be\u7684\u3002\u4e3b\u8981\u4e5f\u662f\u501f\u52a9\u4e00\u4e9b\u63d2\u4ef6\uff0cflash\u7b49\u53bb\u5b9e\u73b0\u3002\u6709\u7684\u505a\u6cd5\u662f\u5728\u9009 [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":294,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[87,119,89,88],"class_list":["post-293","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-html5","tag-createobjecturl","tag-html5","tag-window-createobjecturl","tag-window-url"],"_links":{"self":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/293","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=293"}],"version-history":[{"count":1,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/293\/revisions"}],"predecessor-version":[{"id":295,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/293\/revisions\/295"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/media\/294"}],"wp:attachment":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=293"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=293"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=293"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}