<html> <head> <link href="StyleSheet.css" rel="stylesheet" type="text/css" /> <script src="JScript.js" type="text/javascript" <pre lang="cs">roller= new Array(); links=new Array(); roller[0]= new Image(322,322) roller[0].src = 'image/1.jpeg' roller[1]= new Image(322,322) roller[1].src = 'image/2.jpg' roller[2] = new Image(322, 322) roller[2].src = 'image/3.jpg' //roller[3] = new Image(322, 322) //roller[3].src = 'image/6.jpg' //roller[4] = new Image(322, 322) //roller[4].src = 'image/7.jpg' //roller[5] = new Image(322, 322) //roller[5].src='image/8.jpg' showthis = 0; function RandomSwapOut(t) { showthis = parseInt((Math.random() * (roller.length - 1)) + 1); alert(t); alert(showthis+1); var img = document.getElementById('digit'); img.src = roller[showthis].src; img.parentNode.href = links[showthis]; return true; } function RandomSwapout2() { showthis = parseInt((Math.random() * (roller.length - 1)) + 1); var img = document.getElementById('less'); alert(showthis + 1); img.src = roller[showthis].src; img.parentNode.href = links[showthis]; return true; } function RandomSwapout3() { showthis = parseInt((Math.random() * (roller.length - 1)) + 1); var img = document.getElementById('means'); alert(showthis + 1); img.src = stoller[showthis].src; img.parentNode.href = links[showthis]; return true; } >< ;/script> <title>Random Image</title> </head> <body> <div> <div id="Top"> <h1>Leaders</h1> <img id="digit" src="image/1.jpeg" onmouseover="RandomSwapOut(this.src)" onmouseout= "this.'image/2.jpg'" border="0" height="322" width="322"/> <img id="less" src="image/2.jpg" onmouseover="RandomSwapout2(this.src)" onmouseout= "this.'image/3.jpg'" border="0" height="322" width="322" /> <img id="means" src="image/3.jpg" onmouseover="RandomSwapout3(this.src)" onmouseout= "this.'image/1.jpeg'" border="0" height="322"width="322" /> </div> </div> </body> </html></pre>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)