Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

javascript- changing images

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
<BASE HREF=&quot;<HTML>
<HEAD>
</HEAD>
<BODY onload=&quot;go()&quot;>
<script>
function draw(choice)
{
document.images[choice].src=&quot;gopher.gif&quot;
}

function go()
{
for (var i=0; i<100; i++)
{
document.write('<a href=javascript:void(0) onMouseover=draw(i)><img src=blank.gif width=5 height=5 border=1></a>')
}
}

</script>
</BODY>
</HTML>
 
Hi Pete,

Could you post your question as well next time :) - sometimes it helps...

Is this what you are after?

<BASE HREF=&quot;<HTML>
<HEAD>
<script>
function draw(choice)
{ document.images[choice].src=&quot;gopher.gif&quot; }

function go()
{
for (var i=0; i<100; i++) {
document.write('<a href=javascript:void(0) onMouseover=draw('+i+')><img src=blank.gif width=5 height=5 border=1></a>')
}
}

</script>
</HEAD>
<BODY>
<script>go()</script>
</BODY>
</HTML>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top