可控制的背景變化的按鈕

來源:互聯網
上載者:User
提示:您可以先修改部分代碼再運行

<html><head><title>可控制的背景變化的按鈕</title><style type="text/css"><!--body { font-family: "宋體"; font-size: 9pt; margin-top: 0px; margin-left: 4px; margin-right: 0px}A { COLOR: black; FONT-SIZE: 13px; FONT-WEIGHT: 400; TEXT-DECORATION: none } A:hover { COLOR: red; FONT-SIZE: 13px; FONT-WEIGHT: 400; TEXT-DECORATION: underline }a:active { font: 9pt "宋體"; cursor: hand; color: #FF0033 }--></style><meta http-equiv="Content-Type" content="text/html; charset=gb2312"></head><body><br><br><center><font color=red face="隸書" size=6>按鈕驅動背景變化</font></center><br><center><table border=1 bordercolor=#000000 borderlight=green cellpadding="0" cellspacing="0"><tr><td align=center><font size=5 color=red face="Arial, Helvetica, sans-serif"><strong>下面框中為指令碼顯示區</strong></font></td></tr><tr><td align=center height=80><script language="JavaScript">var COLOR = 999999var woot = 0function stoploop(){document.bgColor = '#336699';clearTimeout(loopID);}function loopBackground(){if (COLOR > 0){document.bgColor = '#' + COLORCOLOR -= 111111loopID = setTimeout("loopBackground()",1)}else{document.bgColor = '#336699'woot += 10COLOR = 999999COLOR -= wootloopID = setTimeout("loopBackground()",1) }}</script>  <input type="button" value="開始背景變化" onClick="loopBackground()"><br> <input type="button" value="結束背景變化" onClick="stoploop()"></td></tr></table></center><br><br><center><SCRIPT LANGUAGE="JavaScript"><!-- hidefunction goHist(a){ history.go(a);}//--></script></center><br><center> <br><br></body></html>
提示:您可以先修改部分代碼再運行

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.