very simple javascript but has error

by 1 replies
2
I wrote this to remove the text underline from a link.
I know normally it's easier with css but I can't do that here-long story.
HTML Code:
<body><a onmouseover="this.text-decoration='none'" href="#"
 target="_top">dog</a>
</body>
For some reason it doesn't work.
#website design #error #javascript #simple
  • This should work -

    Code:
    <body><a onmouseover="this.style.textDecoration='none'" href="#"
     target="_top">dog</a>
    </body>
    • [ 1 ] Thanks

Next Topics on Trending Feed

  • 2

    I wrote this to remove the text underline from a link. I know normally it's easier with css but I can't do that here-long story. HTML Code: <body><a onmouseover="this.text-decoration='none'" href="#" target="_top">dog</a> </body> For some reason it doesn't work.