/    Sign up×
Community /Pin to ProfileBookmark

Javascript to CSS underline not working.

For some reason the javascript does not change the CSS when I call the function.

[CODE]<html>
<head>
<script language=’javascript’ type=’text/javascript’>

function poypoy()
{
var poy=document.getElementByID(‘F’);
poy.style.textDecoration=’underline’;
}
</script>

<style type=”text/css”>
A:link {text-decoration: none; color: white;}
A:visited {text-decoration: none; color: white;}
A:active {text-decoration: none; color: white;}
A:hover {text-decoration: underline; cursor: pointer;}
</style>
</head>
<body>
<table style=’border: 1px solid white;’>
<tr>
<center><td colspan=”2″ id=’box’ style=’text-align: center;’> <font color=white> <a id=’F’ style=” onclick=’poypoy();’ href=’#’>Friend</a>
<a href=’#’>Group</a> <a href=’#’>Chatting</a>
<bt>
<div=’diffp’></div>
</td>
</tr>
</table>
</body>
</html>[/CODE]

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@rpgfan3233Jun 25.2008 — getElementByI[color=red]D[/color][/quote]
should be
getElementByI[color=blue]d[/color][/quote]

That should fix things.
Copy linkTweet thisAlerts:
@GB_001authorJun 25.2008 — Thankyou it worked.
×

Success!

Help @GB_001 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.29,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...