Print Page | Close Window

Text Swapping

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Web Design Discussion
Forum Description: Discussion on web design and development subjects.
URL: https://forums.webwiz.net/forum_posts.asp?TID=2121
Printed Date: 28 March 2026 at 5:52am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Text Swapping
Posted By: detour
Subject: Text Swapping
Date Posted: 25 April 2003 at 8:36am
Does anyone know if its possible to swap the text contained in a DIV tag when the mouse is rolled over a link somewhere else on the page?



Replies:
Posted By: ultramods
Date Posted: 25 April 2003 at 9:50am

Heres a basic example but i have used the <span> tag insted of <div>.

<html>
<head>
<script language=javascript>
<!--
function changeText()
{
testData.innerText="isn't this fun"

}
//-->
</script>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body bgcolor="#FFFFFF" text="#000000" >

<p onMouseOver="changeText()">gfggfdg </p>

<span id=testData></span>
</body>
</html>

 




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net