The upload form with image preview function, the complete HTML code is as follows <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <title>Upload form with image preview function jb51.net</title> <script> function viewmypic(mypic,imgfile) { if (imgfile.value){ mypic.src=imgfile.value; mypic.style.display=""; mypic.border=1; } } </script> </head> <body> <center> <form> <input name="imgfile" type="file" id="imgfile" size="40" onchange="viewmypic(showimg,this.form.imgfile);" /> <br /> </form> <img name="showimg" id="showimg" src="" style="display:none;" alt="Preview image" /> <br /> </div> <div style="display:none"> </div> </center> </body> </html> |
<<: How to encapsulate query components based on element-ui step by step
>>: Introduction to /etc/my.cnf parameters in MySQL 5.7
1. Fixed width + adaptive Expected effect: fixed ...
Recently, I ran a spark streaming program in a ha...
Inline format <colgroup>...</colgroup>...
This article uses examples to describe the manage...
1. Project Structure 2.CallTomcat.java package co...
Table of contents Preface 1. MySQL master-slave r...
After setting up the MySQL master-slave, you ofte...
1. Introduction Is it considered rehashing old st...
Arial Arial is a sans-serif TrueType font distribu...
Using the <img> element with the default sr...
Table of contents 1. What is deconstruction? 2. A...
Table of contents The use of Vue's keep-alive...
1. The window size opened by the HTML hyperlink C...
Detailed explanation of the role of static variab...
Table of contents System update configuration Cha...