android - Onkeydown failed to work on (screen touch ) -


i have textbox default value onkeydown should cleared default value seems i'm not able fix please me on this.

this script

$('input').keydown(function () {     this.value = ""  });  $('input').blur(function () {     if (this.value = "") {         this.value = this.title;     } });      

you want use focus() not keydown() clearing default text, otherwise won't possible type in box. secondly, javascript case sensitive, should if, not if, , need use == comparison operator.

$('input').focus(function () {     this.value = ""  });  $('input').blur(function () {     if (this.value == "") {         this.value = this.title;     } }); 

Comments

Popular posts from this blog

How to access named pipes using JavaScript in Firefox add-on? -

multithreading - OPAL (Open Phone Abstraction Library) Transport not terminated when reattaching thread? -

node.js - req param returns an empty array -