javascript - How to prevent linefeed when hit enter on Firefox OS mobile phone -


i want use return key submit something. how prevent linefeed. don't want produce '\r' or '\n'.

i used code like:

if(e.keycode  == 13){     if(textcontent != ""){submit();}     //e.preventdefault();     //e.stoppropation();     e.returnvalue = false;     return false; } 

i don't want make new row.

your code (you don't need e.returnvalue), have use on keydown event, not keyup.


Comments

Popular posts from this blog

java - activate/deactivate sonar maven plugin by profile? -

python - TypeError: can only concatenate tuple (not "float") to tuple -

java - What is the difference between String. and String.this. ? -