1//ãã¼ã«ãªã¼ãã¼ 2function cq_rollover() { 3 4 if (document.getElementsByTagName) { 5 6 //ãã¬ãã¼ãç¨é å 7 var preload_images = new Array(); 8 9 //ç»åå¦ç 10 var images = document.getElementsByTagName("img"); 11 12 for (var i=0; i < images.length; i++) { 13 if (images[i].getAttribute("src").match("-off.")) { 14 15 //ãã¬ãã¼ãå¦ç 16 preload_images[i] = new Image(); 17 preload_images[i].src = images[i].getAttribute("src").replace("-off.", "-on."); 18 19 //ãã¦ã¹ãªã¼ãã¼å¦ç 20 images[i].onmouseover = function() { 21 this.setAttribute("src", this.getAttribute("src").replace("-off.", "-on.")); 22 } 23 24 //ãã¦ã¹ã¢ã¦ãå¦ç 25 images[i].onmouseout = function() { 26 this.setAttribute("src", this.getAttribute("src").replace("-on.", "-off.")); 27 } 28 29 } 30 } 31 32 //input type="image" å¦ç 33 var images = document.getElementsByTagName("input"); 34 35 for (var i=0; i < images.length; i++) { 36 37 if (images[i].type != 'image') { 38 continue 39 } 40 41 if (images[i].getAttribute("src").match("-off.")) { 42 43 //ãã¬ãã¼ãå¦ç 44 preload_images[i] = new Image(); 45 preload_images[i].src = images[i].getAttribute("src").replace("-off.", "-on."); 46 47 //ãã¦ã¹ãªã¼ãã¼å¦ç 48 images[i].onmouseover = function() { 49 this.setAttribute("src", this.getAttribute("src").replace("-off.", "-on.")); 50 } 51 52 //ãã¦ã¹ã¢ã¦ãå¦ç 53 images[i].onmouseout = function() { 54 this.setAttribute("src", this.getAttribute("src").replace("-on.", "-off.")); 55 } 56 57 } 58 } 59 60 } 61 62} 63 64if (window.addEventListener) { 65 window.addEventListener("load", cq_rollover, false); 66} else if (window.attachEvent) { 67 window.attachEvent("onload", cq_rollover); 68}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.