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

android - Why am I getting the message 'Youractivity.java is not an activity subclass or alias' -

Making Empty C++ Project: General exception (Exception from HRESULT:0x80131500) Visual Studio Community 2015 -

How to fix java warning for "The value of the local variable is not used " -