adam84 Posted February 8, 2008 Share Posted February 8, 2008 Does anyone know how to change the title/alt/tooltip of an object in javascript?! thanks Link to comment https://forums.phpfreaks.com/topic/89999-changing-the-title-or-alt-of-an-object/ Share on other sites More sharing options...
haku Posted February 8, 2008 Share Posted February 8, 2008 Give an example of what you want to change, and we can give an example on how to change that. Link to comment https://forums.phpfreaks.com/topic/89999-changing-the-title-or-alt-of-an-object/#findComment-461463 Share on other sites More sharing options...
adam84 Posted February 8, 2008 Author Share Posted February 8, 2008 HTML <INPUT TYPE=BUTTON NAME=btn1 ID=btn1 TITLE='Click Me' ONCLICK=clicked();> JS function clicked(){ document.getElementById('btn1').style.title = 'Been Clicked!'; } not sure what do you Link to comment https://forums.phpfreaks.com/topic/89999-changing-the-title-or-alt-of-an-object/#findComment-461465 Share on other sites More sharing options...
phpQuestioner Posted February 8, 2008 Share Posted February 8, 2008 You almost had it: document.getElementById('btn1').title = 'Been Clicked!'; Link to comment https://forums.phpfreaks.com/topic/89999-changing-the-title-or-alt-of-an-object/#findComment-461469 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.