Elentari
06-07-2003, 12:37 AM
Can someone who knows javascript please modify this so that it can be used several times on the same page. It's a script that changes text on mouseover. I'm trying to use it in a calendar that when you hover over a number, it will show the things I have to do for that day...this does exactly what I want it to but it only does it for one, I don't know how to make it do it for all the days in the month. Please help.
<head>
<script type="text/javascript">
function def(val) {
div1.innerHTML = val;
}
function change(val) {
div1.innerHTML = val;
}
</script>
</head>
<body>
<p id="div1" onmouseover="change('New Text');" onmouseout="def('Old Text');">Old Text</p>
</body>
<head>
<script type="text/javascript">
function def(val) {
div1.innerHTML = val;
}
function change(val) {
div1.innerHTML = val;
}
</script>
</head>
<body>
<p id="div1" onmouseover="change('New Text');" onmouseout="def('Old Text');">Old Text</p>
</body>