How to provide Tooltip text in Javascript?

 Posted by vishalneeraj-24503 on 5/6/2014 | Category: Interview Questions Interview questions | Views: 1880 | Points: 40

With the help of Title property we can provide Tooltip on any controls,whether controls are Server side or Asp.Net controls or HTML controls,we will use Title property.We have to first find control id through document.getElementById method of Javascript.Then use title property as follows:-

document.getElementById('btn_save').title = "Save Record";

document.getElementById('btn_delete').title = "Delete Selected Record";
Where btn_save is our Asp.Net control and btn_delete is our HTML control.

Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response