.val() with button. input[type=button] for Carriage return - Javascript jQuery

Javascript examples for jQuery:Form Button

Description

.val() with button. input[type=button] for Carriage return

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.9.1.js"></script> 
      <script type="text/javascript">
    $(function(){//from  w  ww  . j  a v  a  2s . com
$('input').val('Carriage\r\nreturn');
    });

      </script> 
   </head> 
   <body> 
      <input type="button" value="Carriage
return" style="text-align:center;">  
   </body>
</html>

Related Tutorials