javascript 上下banner替換具體實現(xiàn)
<!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" content="text/html; charset=utf-8" />
<title>無標題文檔</title>
<script type="text/javascript">
</script>
<script type="text/javascript">
var x=400;
function dianji(){
document.getElementById('yincang').style.height=x+'px';
x--;
var time=setTimeout('dianji()',10);
if(x==200){
clearTimeout(time);
//document.body.bgColor='red';
document.getElementById('yincang').style.display='none';
document.getElementById('xianshi').style.display='block';
}
}
</script>
<script type="text/javascript">
</script>
<style type="text/css">{ display:block}</style>
</head>
<body onload="dianji()" >
<div id="yincang" style=" background:#CCC; height:400px;"></div>
<div id="xianshi" style="background:#0F0; height:200px; display:none;">fdafda</div>
<div style="background:#666; height:2000px;"></div>
</body>
</html>
相關(guān)文章
JavaScript 獲取 URL 中參數(shù)值的方法
本文將詳細介紹幾種在 JavaScript 中獲取 URL 參數(shù)值的方法,包括現(xiàn)代瀏覽器支持的 URLSearchParams、正則表達式解析以及自定義函數(shù)解析方案,并討論各自的優(yōu)缺點及適用場景,感興趣的朋友一起看看吧2025-04-04
javascript 自動標記來自搜索結(jié)果頁的關(guān)鍵字
使用javascript自動標記來自搜索結(jié)果頁的關(guān)鍵字的實現(xiàn)代碼。2010-01-01
javascript 數(shù)據(jù)存儲的常用函數(shù)總結(jié)
這篇文章主要介紹了javascript 數(shù)據(jù)存儲的常用函數(shù)總結(jié)的相關(guān)資料,需要的朋友可以參考下2017-06-06

