<%@ page language = "java"import = "java.util.*"pageencoding = "utf-8"%> <! doctype html public "-// w3c // dtd xhtml 1.0 Transitional // en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd"> html xmlns ="http://www.w3.org/1999/xhtml "> <head> <meta http-equiv ="content-type ""텍스트/http-equiv =; charset = gb2312 "/> <title> </title> </witch> </head> <syle> <style type ="text/css "> <!- #demo {backgring : #fff; 오버플로 : 숨겨진; 경계 : 1px 점선 #ccc; width : 1000px;} #demo img {10px solit #f2f2; 왼쪽; 너비 : 800%;}#demo1 {float; 왼쪽;}#demo2 {float : left;}-> </style> <div id = "demo"> <div id = "indemo"> <div id = "demo1"> <a href = "#"> <img src = "images/小美景 1.jpg"/</a> <a href = "> <a href ="<a href = "<a href ="<a href = "#"> src = "images/小美景 2.jpg"/> </a> <a href = "#"> <img src = "im /> </a> <a href = "#"> <img src = "images/小美女 2.jpg"/> </a> </div id = "demo2"> </div> </div> </div> <cript> var speed = 50; var tab = document.getElementById ( "demo"); Var Tab1 = DeMo1 "); tab2 = document.getElementById ( "demo2"); tab2.innerhtml = tab1.innerhtml; function marquee () {if (tab2.offsetwidth-tab.scrollleft <= 0) tab.scrollleft- = tab1.offsetwidthelse {tab.scrollleft ++;} var mymar = setInterVal (marquee, speed); tab.onmouseOver = function () {clearInterVal (mymar)}; tab.onMouseOut = function () {mymar = setInterval (marquee, speed)}; </script> </body> </html>