In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly introduces the html5 how to read the local file related knowledge, the content is detailed and easy to understand, the operation is simple and fast, has a certain reference value, I believe that everyone after reading this html5 how to read the local file article will have a harvest, let's take a look.
The code is as follows:
Add Picture
In terms of style, the input box of the input element should not be displayed. At this time, you need to set the input to a transparent style, and then cover it over the button element before you can click button to upload the picture. If accepted is set to "image/*", only image files are allowed to upload.
The Css style is as follows
.addpic {position:relative; margin-left:100px; width:95px; height:30px;} .addlogo {background: none repeat scroll 00 rgba (0,0,0,0); cursor: pointer; font-size: 30px; opacity: 0; position: absolute; right: 0; top: 0; z-index: 10;} js code is as follows: function readFiles (evt) {var files=evt.target.files; if (! files) {console.log ("the file is invaild"); return;} for (var item0, file) File=files [I]; iTunes +) {var imgele=new Image (); var thesrc=window.URL.createObjectURL (file); imgele.src=thesrc; imgele.onload=function () {$("# showlogo"). Attr ("src", this.src);} $(document) .ready (function () {$("# logoimg") .change (function (e) {readFiles (e)});}); this is the end of the article on "how html5 reads local files". Thank you for reading! I believe you all have a certain understanding of "how to read local files in html5". If you want to learn more, you are welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.