html - tooltip when max input length reached -


can give tooltip input type text in case max length of textbox reached in html???

yes, can set tooltip text box

/*  txtname id of youe textbox  val value of textbox  ccount max length of textbox.   if ccount set 4   if value of textbox exceed 4 show tooltip  */ function txttooltip(txtname, val, ccount) {     var txttool = document.getelementbyid(txtname);     if (txttool.value.length > ccount) {         //setting tool tip value.         txttool.title = txttool.value;     } } 

your input box is

<input type="text" name="txtnm" id="txtnm" onkeyup="txttooltip(this.id, this.value, 4);"/> 

Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

html - Instapaper-like algorithm -

c# - How to execute a particular part of code asynchronously in a class -