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
Table of contents Business Logic Data table struc...
Preface These principles are summarized from actu...
Step 1: Ensure that MySQL has binlog enabled show...
Preface When introducing defineProperty before, I...
Scary, isn't it! Translation in the picture: ...
Table of contents Introduction Child Process Crea...
Table of contents 1.union: You can add query resu...
Table of contents Overview Front-end knowledge sy...
I wrote some Qt interface programs, but found it ...
This article example shares the specific code of ...
I have learned some basic selectors of CSS before...
Lots of links You’ve no doubt seen a lot of sites ...
Table of contents 1. Create a table 1.1 Create te...
Sometimes we want to implement such a function: c...
A WeakMap object is a collection of key/value pai...