How can i get (change run time) tool tip text of buttons created in HTML?

Luke Latimer

This works as an example of changing the title property of a button dynamically

<html>
<head>
<title>Test</title>
<script language="javascript">

function updateTipText()
{

document.all["tipText"].title=document.all["newText"].value

}

</script>
</head>

<body>


<input type="button" id="tipText" title="tool tip text" value="a button">
<input type="text" id="newText">
<input type="button" id="changeText" value="update tool tip"
  onClick="javascript: updateTipText()">
</body>
</html>

0 Comments  (click to add your comment)
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

About | Sitemap | Contact