Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $(document).ready(function(){
- $('#textarea').keypress(function(e){
- if(e.shiftKey === true){
- if(e.which == 13){
- $('#textarea').append("\n");
- }
- }else if(e.shiftKey === false){
- if(e.which == 13){
- // submit to form using submit()
- $('span#display').text($('#textarea').val());
- }
- }
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement