How to make Enter character forbidden in textarea

How can i disable users to Not entering in TEXTAREA in html with javascript ?

Is it Possible to do it with Jquery ?

Answers


$('textarea').keydown(function(evt){
    if (evt.keyCode == 13) {
        evt.preventDefault();
    }
});

Here's a fiddle.


Need Your Help

Mysterious $message in Facebook notification emails

php facebook email

It might seem like a silly question but I'm wondering why on earth there is a hidden $message inside the notification emails that are sent by Facebook when a friend of yours has updated his/her sta...

Sorted number permutations list from numeric variables or numeric list with no duplicates

python python-3.x

Number permutations function, creates a list of all possible arrangements.