|
-
Jun 12th, 2001, 07:46 PM
#5
Fanatic Member
This code should do it:
******************************************
<html>
<head>
<title>changing colors</title>
<style TYPE = "text/css">
p {color:black;}
</style>
<script LANGUAGE = "JavaScript">
function changeMe(){
var numTags = 0;
numTags = document.all.tags("p").length;
for( var i = 0; i < numTags; i++){
document.all.tags("P")[i].style.color = 'blue';
}
}//end function
</script>
</head>
<body>
<p ONCLICK = "changeMe();">
<br>
<b> Text within the p tags</b>
<br>
</p>
<p>Second p tag</p>
</body>
</html>
********************************************
Chris
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|