Javascript examples for jQuery:Form Button
.val() with button. input[type=button] for Carriage return
<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>