1

I have a webview that contains an input html as follow:

<input type="file" name="upload" onChange="checkimg(this.value)"/>

and JavaScript functions correspond with that component

function checkimg(fName){
    fullName=fName;
    splitName = fullName.split(".");
    fileType = splitName[1];
    fileType = fileType.toLowerCase();
    if (fileType == 'jpg'|| fileType == 'gif' || fileType == 'png' || fileType == 'jpeg' )
    {} 
    else {
        alert("Choose file with end : jpg, gif, png, jpeg");
        }
}

Now I want to get event when click input type file. How must I do?

BenMorel
  • 34,448
  • 50
  • 182
  • 322
user1060362
  • 109
  • 2
  • 3
  • 10

0 Answers0