javascript - Change alert to input field -


i have code file name when i'm browsing image file.

document.getelementbyid('image').addeventlistener('change',prepareupload,false);  function prepareupload(event) {   var files = event.target.files;   var filename = files[0].name;   alert(filename);   filenames=document.watermark_url.filenames.value; } 

but example code prompt file name instead of displaying in input field. how change code when upload image, file name display in input field?

change alert document.getelementbyid('inputtext.id').value = filename;


Comments

Popular posts from this blog

sql - VB.NET Operand type clash: date is incompatible with int error -

SVG stroke-linecap doesn't work for circles in Firefox? -

python - TypeError: Scalar value for argument 'color' is not numeric in openCV -