Alternatives
Members may post updates or alternatives to this current article in order to show different
approaches or add new features.
4 Nov 2012Sergey Alexandrovich Kryukov
To start with, if you are already using jQuery, document.getElementById is not needed, as you can use jQuery selectors:http://api.jquery.com/category/selectors/[^].Now the solution: text box is actually the input element with the attribute type="text". For all input elements, its value is...
Try this its working fine :-) $(function () { $("#mytext").focus(function () { var keyPressed = false; $("#mytext").keypress(function () { // alert("Handler for .keypress() called."); keyPressed = true; ...
Hi,Try this if could help...$(document).ready(function() {$("#mytextbox").focus(function() {if($("#mytextbox").val() != "") $("#mytextbox").val(""); });});Do not forget to mark as answer if could help...Regards,
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.