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

圖片在顯示一定的時間後消失

2022-06-13   來源: JSP教程 

  圖片在顯示一定的時間後消失

  將以下代碼加到〈body〉與〈/body〉之間
<SCRIPT language=>
// ) 設置ALT屬性
var alttext=M空間國際域名國內
// ) 設置下列屬性為 或者(是IE特有的使LOGO隱現)
var fadeintoview=

var visibleduration=

  function regenerate(){
windowlocationreload()
}
function regenerate(){
if (documentlayers)
setTimeout(windowonresize=regenerate)
}
var fadeset=
if (fadeintoview)
fadeset=filter:alpha(opacity=)
if (documentall)
documentwrite(<span ></span>)
function bringintoview(){
if (logofiltersalphaopacity<=)
logofiltersalphaopacity+=
else{
clearInterval(viewit)
if (visibleduration!=)
setTimeout(logostylevisibility=hiddenvisibleduration*)
}
}
function createlogo(){
staticimage=new Layer()
staticimageleft=
staticimagetop=
staticimagedocumentwrite(<a +logolink+><img src=+staticlogosrc+ border= alt=+alttext+></a>)
staticimagedocumentclose()
staticimagevisibility=show
regenerate()
staticitns()
}
if (documentlayers)
windowonload=createlogo;
if (documentall){
w=
h=
logostyleleft=w
logostyletop=h
}
function logoit(){
var w=documentbodyscrollLeft+w
var h=documentbodyscrollTop+h
logostyleleft=w
logostyletop=h
}
function logoit(){
staticimageleft=pageXOffset+
staticimagetop=pageYOffset+
}
function insertimage(){
logoinnerHTML=<a +logolink+><img src=+staticlogosrc+ border= alt=+alttext+></a>
if (fadeintoview)
viewit=setInterval(bringintoview())
else{
if (visibleduration!=)
setTimeout(logostylevisibility=hiddenvisibleduration*)
}
}
if (documentall){
windowonscroll=logoit
windowonresize=new Function(windowlocationreload())
windowonload=insertimage
}
function staticitns(){
setInterval(logoit())
if (visibleduration!=)
setTimeout(staticimagevisibility=hidevisibleduration*)
}
//>
</SCRIPT>


From:http://tw.wingwit.com/Article/program/Java/JSP/201311/19305.html
    推薦文章
    Copyright © 2005-2022 電腦知識網 Computer Knowledge   All rights reserved.