Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
var newdiv = document.createElement("div");
newdiv.id = whichform + "divfile" + filenum;
var newtr = document.createElement("TR");
var newtd1 = document.createElement("TD");
newtd1.width = "250"
var spanfilename = document.createElement("span");
spanfilename.id = whichform + "FileAttachName" + filenum;
var newtd2 = document.createElement("TD");
newtd2.width = "530"
var spaninput = document.createElement("span");
spaninput.id = whichform + "FileAttachSel" + filenum;
var mytext = document.createTextNode('File: ');
var fileinput = document.createElement("input");
fileinput.size = 40;
fileinput.type = "file";
fileinput.name = whichform + "file" + filenum;
fileinput.UNSELECTABLE = "on";
newtd1.appendChild(spanfilename);
newtr.appendChild(newtd1);
spaninput.appendChild(mytext);
spaninput.appendChild(fileinput);
newtd2.appendChild(spaninput);
newtr.appendChild(newtd2);
newdiv.appendChild(newtr);
myouterspan.appendChild(newdiv);
<fieldset id="fset_images">
<legend>Images</legend>
<p><input type="file" name="fld_images[]" /></p>
<a href="#" id="addImage">+ Add another image</a>
</fieldset>
window.onload = function(){
var addImageButton = document.getElementById('addImage');
addImageButton.onclick = function(){
//create an input element
var element = document.createElement('input');
element.setAttribute('type','file');
element.setAttribute('name','fld_images[]');
//insert the element into the DOM
var imageSet = document.getElementById('fset_images');
var para = document.createElement('p');
imageSet.insertBefore(para,addImageButton);
para.appendChild(element);
}
}