displaying values in Text box - Javascript jQuery

Javascript examples for jQuery:Text

Description

displaying values in Text box

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <script type="text/javascript" src="https://code.jquery.com/jquery-1.12.4.min.js"></script> 
  <script type="text/javascript">
    window.onload=function(){//from  w w w .ja v a2 s. c o m
$('.submitButton').click(function(){
  $('#DataBus').val('It works...');
});
    }

      </script> 
 </head> 
 <body> 
  <input type="text" id="DataBus" name="DataBus"> 
  <button class="submitButton"> Submit </button>  
 </body>
</html>

Related Tutorials