Javascript examples for jQuery:Form Input
Disable an input element by name
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript" src="https://code.jquery.com/jquery-1.7.1.js"></script> <script type="text/javascript"> $(function(){/*from w ww . j a va 2 s . co m*/ $("input[name='val1']").prop("disabled", true); }); </script> </head> <body> <input type="file" name="val1"> </body> </html>