I am trying to create a form where the user uses the item on a text box and when he "records" "Text in a list, however, I also want to make it clear how they put it in the form, when they enter (like sort Skype). Here's my jquery code.
$ ('# inputpnote'). Keypress (function) {var keycode = (event.keyCode? Event.keyCode: event.which); if (keycode == '13') {var $ pnote = document.getElementById ("inputpnote"); if ( $ Pnote.length> gt; {$ ("# pnotes-list"). Attachments ("& lt; div class = 'Pnote-list' & gt; " + $ pnote + " & Lt; / li & gt; & lt; / div & gt; "); $ pnote.reset ();}}});
#inputpnote
is text form and # pnotes-list
, where I'm typing text. Thank you
If #inputpnote
is not a form ID, but a field ID, You will probably need to use val
:
$ ('# inputpnote'). Val ('');
No comments:
Post a Comment