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 Boolean Type Number Types Strin...
Notice! ! ! select * from user where uid not in (...
For Linux system administrators, it is crucial to...
Table of contents 1. Introduction 2. select 2.1 Q...
How to allow remote connection in MySql To achiev...
Disable right-click menu <body oncontextmenu=s...
There are many tags in XHTML, but only a few are ...
This article shares the specific code of vue3 enc...
Table of contents 1. Development Environment 2. I...
Result: Implementation code: html <div class=&...
Recently I saw a barrage effect on B station call...
1. Differences between JSON.stringify() and JSON....
Overview In a relational database, an index is a ...
Table of contents 1. Overview 2. Define a simple ...
Docker private image library Docker private image...