Javascript examples for jQuery:Form Input
HTML input file selection event firing
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript" src="https://code.jquery.com/jquery-1.8.3.js"></script> <script type="text/javascript"> $(window).load(function(){/*from w ww. j ava 2 s .c o m*/ var input = document.getElementsByTagName('input')[0]; input.onclick = function () { this.value = null; }; input.onchange = function () { console.log(this.value); }; }); </script> </head> <body> <input type="file" value="C:\fakepath"> </body> </html>