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 Quote Link to comment 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. Quote Link to comment 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 Quote Link to comment 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!'; Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.