PayneLess_Designs

PayneLess Designs - Change Text on Mouseover Script

Feb 9th, 2012
250
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 0.80 KB | None | 0 0
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <html><head>
  3. <meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
  4. <title>Change Text on Mouseover Script</title>
  5. <meta name="description" content="">
  6. <meta name="keywords" content="">
  7. <meta name="author" content="">
  8. </head><body>
  9. <h3>Example One:</h3>
  10. <p><span id="myText">some text</span></p>
  11.  
  12. <p><a href="someurl" onmouseover="document.getElementById('myText').firstChild.data = 'some other text'; return true;" onmouseout="document.getElementById('myText').firstChild.data = 'some text'; return true;">link text</a></p>
  13.  
  14. <h3>Example Two:</h3>
  15. <p><a href="#" onclick="this.innerHTML='<strong>You changed me</strong>';"><em>Change from emphasized to strong.</em></a></p>
  16. </body></html>
Advertisement
Add Comment
Please, Sign In to add comment