脚本源代码 <body> <style> body {backgroundcolor:#} #all {width:px; height:px; backgroundcolor:#FFFFFF; overflow:hidden; } #left {width:px; backgroundcolor:#FFF; float:left; height:px} #left li {cursor:hand; font:bold px Arial Black; liststyle:circle; marginleft:px; color:#FFFFFF} #right {width:px; backgroundcolor:#FFFF; float:left; height:px; cursor:hand;font:bold px Arial Black; color: #} </style> <script language=javascript> function $(id) {return documentgetElementById(id)} function left(id) { var alla= $(alla); var right= $(right); var alla_left=parseInt(allastylemarginLeft); if (alla_left==) { if (id==) {rightinnerHTML=#AEFA;;rightstylebackgroundColor=#AEFA} else if (id==) {rightinnerHTML=#ADFAA;rightstylebackgroundColor=#ADFAA} else if (id==) {rightinnerHTML=#FAF;;rightstylebackgroundColor=#FAF} left_decrease() } if (alla_left==) {right_decrease()} } function left_decrease() { var alla= $(alla); var alla_left=parseInt(allastylemarginLeft); if (alla_left==) {clearTimeout(time)} else { allastylemarginLeft=alla_left; time= setTimeout(left_decrease()) } } function right_decrease() { var alla= documentgetElementById(alla); var alla_left=parseInt(allastylemarginLeft); if (alla_left==) {clearTimeout(time)} else { allastylemarginLeft=alla_left+; time= setTimeout(right_decrease())} } </script> <div id=all> <div id=alla > <div id=left> <ul> <li onclick=left() >color</li> <li onclick=left() >color</li> <li onclick=left() >color</li> </ul> </div> <div id=right onclick=left()></div> </div> </div> </body> |