Mouse click text change
Hi, all new here, if some one can help me I promis I will do my me best to help someone else.
Basicly I need a code so when you click on a text it cahanges colours.
Not very undestanding of html code so any sugestions as simple as possible.
<a href="http://_" onClick="document.getElementById('divIDName').style.color='#007878'">
<span id="divIDName">Text Color Changes</span></a>
Last edited by Major Payne; 11-12-2007 at 01:15 AM.
i tried that code and it didn't work. when i click the link it takes me
Worked fine for me in IE and FF. The text does change colors and it will take you to a blank URL. Try href="#" instead or use
which also worked for me in FF and IE.
<span id="divIDName" onClick="document.getElementById('divIDName').style.color='#ff00ff'">Click Me to Change My Color</span>
Last edited by Major Payne; 11-12-2007 at 10:39 AM.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)