熱點推薦:
您现在的位置: 電腦知識網 >> 編程 >> Java編程 >> JSP教程 >> 正文

可選擇背景色的廣告牌效果

2013-11-15 11:34:32  來源: JSP教程 
腳本源代碼
<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>
From:http://tw.wingwit.com/Article/program/Java/JSP/201311/19226.html
    推薦文章
    Copyright © 2005-2013 電腦知識網 Computer Knowledge   All rights reserved.