Select Input by type="xxx" - Javascript jQuery

Javascript examples for jQuery:Form Input

Description

Select Input by type="xxx"

Demo Code

ResultView the demo in separate window

<html lang="en">
   <head> 
      <title>Get input value</title> 
   </head> 
   <body translate="no"> 
      <input type="number"> 
      <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script> 
      <script>
var input = $('input[type=number]');
input.on('clic change', function(){
  console.log($(this).val());
})

    /* w w w  .  j a  v a2 s  .  co  m*/
      </script>  
   </body>
</html>

Related Tutorials