|
藍森林 http://www.lslnet.com 2006年8月25日 8:28
菜鳥問題!!!
這是一個頁面裝載的代碼,請問怎麼用啊!!!
謝謝,比較菜:(
<div align=center>
<div style="width:300;color:#999999" align=left id="show">loading</div>
<div style="color:#999999" id="num">loading</div>
</div>
<script>
var s="|";
var i=0;
var p="";
function phx(){
i++;
p+=s;
document.getElementById("show").innerText=p;
document.getElementById("num").innerText=i+"%";
tT=setTimeout("phx()",50);
if(i>=100){
clearTimeout(tT);
location="/";
}
}
phx();
</script>
|
onclick= "phx()"
這樣子就可以了 |
是把這個代碼存成INDEX。HTM文件嗎?
還是別的什麼方法??? |
ding |
ding |
document.getElementById("show"[color=#cc0000])[/color].innerText=p;
document.getElementById("num"[color=#cc0000])[/color].innerText=i+"%";
[html]
<div align=center>
<div style="width:300;color:#999999" align=left id="show">loading</div>
<div style="color:#999999" id="num">loading</div>
</div>
<script>
var s="|";
var i=0;
var p="";
function phx(){
i++;
p+=s;
document.getElementById("show").innerText=p;
document.getElementById("num").innerText=i+"%";
tT=setTimeout("phx()",50);
if(i>=100){
clearTimeout(tT);
location="/";
}
}
phx();
</script>
[/html] |
謝謝版主
其實我的意思是說,這段代碼是放在index.htm裡面呢,還是單存一個文件呢??
還是別的用法!!! |
|