Complete HTML of upload form with picture preview function


Upload form with picture preview function, complete HTMLcodeAs shown below
<meta http-equiv=”Content-Type” content=”text/html; charset=gb2312″>
<title> upload form with picture preview function</title>
function viewmypic(mypic,imgfile) {
if (imgfile.value){
<form >
<input name=”imgfile” type=”file” id=”imgfile” size=”40″ onchange=”viewmypic(showimg,this.form.imgfile);” />
<br />
<img name=”showimg” id=”showimg” src=”” style=”display:none;” Alt= “preview picture” / >
<br />
<div style=”display:none”>

Recommended Today

JS generate guid method

JS generate guid method Globally unique identification(GUID) is an algorithm generatedBinaryCount Reg128 bitsNumber ofidentifier , GUID is mainly used in networks or systems with multiple nodes and computers. Ideally, any computational geometry computer cluster will not generate two identical guids, and the total number of guids is2^128In theory, it is difficult to make two […]