javascript - jquery keyup function: enabling/disabling a textbox using keyup() -


I am trying to disable the text box using the keypages functionality. I have a textare and a text box now I use a key up operation on the backspace key, as if the length of the content within the text is 3, it The text box should be disabled. I also have a warning message, which is the length of the content in the text area when the pop is done 3. The code has worked for pop up, but it does not work for the text box. What am I missing? Please help. Here's my code:

  $ ('# comment'). Key (function (if (event.which == 8) {var txt = $ ('# comment'). Val () Length; if (txt == 3) {warning ("backspace"); $ ( "# Lesson1"). Atter ("Diasbold", "Dysbald");}}});   

And here's the purpose. < P>

You have some typo here it should be disabled not diagnosed {$ ("disabled", true);} other {$ ("# lesson1") = $ ('# text1') = $ (This) .val () Length; If (Lennon> = 3) {$ ("# text1"). Sahara ("disabled", wrong);}});



Comments

Popular posts from this blog

c# - passing input text from view to contoller with FacebookContext using Facebook app -

ios - Does Core Data autoupdate a many to many relationship on saving -

Calling a C++ function from C# by passing a string with variable size to it -