{"id":1150,"date":"2017-03-18T20:57:20","date_gmt":"2017-03-18T12:57:20","guid":{"rendered":"http:\/\/www.xttblog.com\/?p=1150"},"modified":"2018-09-28T15:42:53","modified_gmt":"2018-09-28T07:42:53","slug":"%e4%bd%bf%e7%94%a8bootstrap%e7%9a%84fileinput%e6%8f%92%e4%bb%b6%e5%ae%9e%e7%8e%b0%e5%a4%9a%e6%96%87%e4%bb%b6%e3%80%81%e5%a4%9a%e8%af%ad%e8%a8%80%e3%80%81%e5%8f%af%e9%a2%84%e8%a7%88%e7%9a%84%e4%b8%8a","status":"publish","type":"post","link":"https:\/\/www.xttblog.com\/?p=1150","title":{"rendered":"\u4f7f\u7528Bootstrap\u7684fileinput\u63d2\u4ef6\u5b9e\u73b0\u591a\u6587\u4ef6\u3001\u591a\u8bed\u8a00\u3001\u53ef\u9884\u89c8\u7684\u4e0a\u4f20\u529f\u80fd"},"content":{"rendered":"<p>\n\t\u6700\u8fd1\u6709\u7fa4\u91cc\u7684\u7f51\u53cb\u79c1\u804a\u6211\uff0c\u95ee\u6211\u5982\u4f55\u5b9e\u73b0\u53ef\u9884\u89c8\u7684\u591a\u6587\u4ef6\u4e0a\u4f20\u529f\u80fd\u3002\u6211\u5c31\u63a8\u8350\u4e86 <a href=\"http:\/\/www.bootcss.com\/\" name=\"Bootstrap \u4e2d\u6587\u7f51\" target=\"_blank\" title=\"Bootstrap \u4e2d\u6587\u7f51\">Bootstrap<\/a> \u7684 <a href=\"http:\/\/plugins.krajee.com\/file-input\" name=\"fileinput.js \u5b98\u7f51\" target=\"_blank\" title=\"fileinput.js \u5b98\u7f51\">fileinput.js<\/a> \u63d2\u4ef6\uff0c\u5728\u8fd9\u91cc\u6211\u518d\u6574\u7406\u4e00\u4e0b\u5b83\u7684\u5177\u4f53\u7528\u6cd5\uff01\n<\/p>\n<h2>\n\tfileinput.js \u5b9e\u73b0\u6587\u4ef6\u4e0a\u4f20\u7684\u8fd0\u884c\u6548\u679c<br \/>\n<\/h2>\n<p>\n\t<img decoding=\"async\" alt=\"Bootstrap fileinput.js \u5b9e\u73b0\u591a\u6587\u4ef6\u4e0a\u4f20\" src=\"https:\/\/raw.githubusercontent.com\/xmt1139057136\/xttblog\/master\/bootstrap-file1.png\" style=\"width: 964px;height: 438px\" \/><img decoding=\"async\" alt=\"Bootstrap fileinput.js \u5b9e\u73b0\u6587\u4ef6\u9884\u89c8\u529f\u80fd\" src=\"https:\/\/raw.githubusercontent.com\/xmt1139057136\/xttblog\/master\/bootstrap-file2.png\" style=\"width: 900px;height: 406px\" \/>\n<\/p>\n<h2>\n\tfileinput.js \u7684\u4f7f\u7528\u65b9\u6cd5<br \/>\n<\/h2>\n<pre class=\"brush:xml;\">\r\n&lt;!DOCTYPE html&gt;\r\n&lt;html lang=&quot;en&quot;&gt;\r\n    &lt;head&gt;\r\n        &lt;meta charset=&quot;UTF-8&quot;\/&gt;\r\n        &lt;title&gt;Bootstrap \u4e0a\u4f20\u6587\u4ef6\u7ec4\u4ef6&lt;\/title&gt;\r\n        &lt;link href=&quot;http:\/\/cdn.bootcss.com\/bootstrap\/3.3.4\/css\/bootstrap.min.css&quot; rel=&quot;stylesheet&quot;&gt;\r\n\t\t&lt;link href=&quot;http:\/\/cdn.bootcss.com\/bootstrap-fileinput\/4.3.8\/css\/fileinput.min.css&quot; media=&quot;all&quot; rel=&quot;stylesheet&quot; type=&quot;text\/css&quot; \/&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;script src=&quot;http:\/\/cdn.bootcss.com\/bootstrap-fileinput\/4.3.8\/js\/fileinput.min.js&quot; type=&quot;text\/javascript&quot;&gt;&lt;\/script&gt;\r\n\t\t&lt;script href=&quot;http:\/\/cdn.bootcss.com\/bootstrap\/3.3.4\/js\/bootstrap.min.js&quot; type=&quot;text\/javascript&quot;&gt;&lt;\/script&gt;\r\n\t\t&lt;style&gt;  \r\n\t\t\t.col-center-block {  \r\n\t\t\t\tfloat: none;  \r\n\t\t\t\tdisplay: block;  \r\n\t\t\t\tmargin-left: auto;  \r\n\t\t\t\tmargin-right: auto;  \r\n\t\t\t}  \r\n\t\t&lt;\/style&gt;\r\n    &lt;\/head&gt;\r\n    &lt;body&gt;\r\n\t\t&lt;div class=&quot;container&quot;&gt;  \r\n\t\t\t&lt;div class=&quot;row myCenter&quot;&gt;\r\n\t\t\t\t&lt;div class=&quot;col-xs-6 col-md-6 col-center-block&quot;&gt;\r\n\t\t\t\t\t&lt;div class=&quot;container kv-main&quot;&gt;\r\n\t\t\t\t\t\t&lt;h4&gt;Bootstrap \u591a\u6587\u4ef6\u4e0a\u4f20\u5b9e\u4f8b&lt;\/h4&gt;\r\n\t\t\t\t\t\t&lt;form enctype=&quot;multipart\/form-data&quot;&gt;\r\n\t\t\t\t\t\t\t&lt;label&gt;\u591a\u6587\u4ef6\u9884\u89c8\u4e0a\u4f20\u5b9e\u4f8b&lt;\/label&gt;\r\n\t\t\t\t\t\t\t&lt;input id=&quot;file-select&quot; name=&quot;file-select[]&quot; type=&quot;file&quot; multiple&gt;\r\n\t\t\t\t\t\t&lt;\/form&gt;\r\n\t\t\t\t\t\t&lt;hr&gt;\r\n\t\t\t\t\t\t&lt;br&gt;\r\n\t\t\t\t\t&lt;\/div&gt;\r\n\t\t\t\t&lt;\/div&gt;\r\n\t\t\t&lt;\/div&gt;\r\n\t\t&lt;\/div&gt;\r\n    &lt;\/body&gt;\r\n\t&lt;script&gt;\r\n    $(&#039;#file-select&#039;).fileinput({\r\n        language: &#039;fr&#039;,\r\n        uploadUrl: &#039;#&#039;,\r\n        allowedFileExtensions : ['jpg', 'png','gif'],\r\n\t\t&#039;elErrorContainer&#039;: &#039;#errorBlock&#039;\r\n    });\r\n\t&lt;\/script&gt;\r\n&lt;\/html&gt;<\/pre>\n<h2>\n\t\u53c2\u8003\u8d44\u6599<br \/>\n<\/h2>\n<p>\n\tbootstrap-fileinput\u6e90\u7801\uff1a<a href=\"https:\/\/github.com\/kartik-v\/bootstrap-fileinput\" name=\"bootstrap-fileinput\u6e90\u7801\" target=\"_blank\" title=\"bootstrap-fileinput\u6e90\u7801\">https:\/\/github.com\/kartik-v\/bootstrap-fileinput<\/a><br \/>\n\tbootstrap-fileinput\u5728\u7ebfAPI\uff1a<a href=\"http:\/\/plugins.krajee.com\/file-input\" name=\"bootstrap-fileinput\u5728\u7ebfAPI\" target=\"_blank\" title=\"bootstrap-fileinput\u5728\u7ebfAPI\">http:\/\/plugins.krajee.com\/file-input<\/a><br \/>\n\tbootstrap-fileinput Demo\u5c55\u793a\uff1a<a href=\"http:\/\/plugins.krajee.com\/file-basic-usage-demo\" name=\"bootstrap-fileinput Demo\" target=\"_blank\" title=\"bootstrap-fileinput Demo\">http:\/\/plugins.krajee.com\/file-basic-usage-demo<\/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=1150\">\u4f7f\u7528Bootstrap\u7684fileinput\u63d2\u4ef6\u5b9e\u73b0\u591a\u6587\u4ef6\u3001\u591a\u8bed\u8a00\u3001\u53ef\u9884\u89c8\u7684\u4e0a\u4f20\u529f\u80fd<\/a><\/p><!-- <div class=\"bd-reward-stl\"><button id=\"bdRewardBtn\"><span><\/span><\/button><\/div> -->","protected":false},"excerpt":{"rendered":"<p>\u6700\u8fd1\u6709\u7fa4\u91cc\u7684\u7f51\u53cb\u79c1\u804a\u6211\uff0c\u95ee\u6211\u5982\u4f55\u5b9e\u73b0\u53ef\u9884\u89c8\u7684\u591a\u6587\u4ef6\u4e0a\u4f20\u529f\u80fd\u3002\u6211\u5c31\u63a8\u8350\u4e86 Bootstrap \u7684 fileinp [&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":[627,900,902,901,903],"class_list":["post-1150","post","type-post","status-publish","format-standard","hentry","category-html5","tag-bootstrap","tag-fileinput-js","tag-js","tag-901","tag-903"],"_links":{"self":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/1150","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=1150"}],"version-history":[{"count":2,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/1150\/revisions"}],"predecessor-version":[{"id":3130,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/1150\/revisions\/3130"}],"wp:attachment":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1150"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1150"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1150"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}