Javascript examples for jQuery Selector:id
JQuery select input element by id and type
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript" src="https://code.jquery.com/jquery-2.1.0.js"></script> <script type="text/javascript"> $(window).load(function(){// www . ja v a 2s .c o m $(document).ready(function(){ $('button').on('click', function(){ console.log($('input[type=text][id=txtEditLoginName]').val()); }); }); }); </script> </head> <body> <input type="text" id="txtEditLoginName"> <button>TEST</button> </body> </html>