Copy Code code as follows:
<! DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 transitional//en" >
<SCRIPT>
var inttimestep=20;
var isie= (window. ActiveXObject)? True:false;
var intalphastep= (Isie)? 5:0.05;
var cursobj=null;
var curopacity=null;
function startobjvisible (ObjID)
{
Cursobj=document.getelementbyid (ObjID);
Setobjstate ();
}
function Setobjstate (evtarget)
{
if (cursobj.style.display== "") {Curopacity=1;setobjclose ();}
else{
if (Isie)
{
Cursobj.style.csstext= ' Display:none; Z-index:1; Filter:alpha (opacity=0); Position:absolute; ';
cursobj.filters.alpha.opacity=0;
}else
{
Cursobj.style.opacity=0
}
Cursobj.style.display= ';
curopacity=0;
Setobjopen ();
}
}
function Setobjopen ()
{
if (Isie)
{
Cursobj.filters.alpha.opacity+=intalphastep;
if (cursobj.filters.alpha.opacity<100) settimeout (' Setobjopen () ', inttimestep);
}else{
Curopacity+=intalphastep;
CurSObj.style.opacity =curopacity;
if (curopacity<1) settimeout (' Setobjopen () ', inttimestep);
}
}
function Setobjclose ()
{
if (Isie)
{
Cursobj.filters.alpha.opacity-=intalphastep;
if (cursobj.filters.alpha.opacity>0) {
SetTimeout (' Setobjclose () ', inttimestep);}
else {cursobj.style.display= ' none ';}
}else{
Curopacity-=intalphastep;
if (curopacity>0) {
CurSObj.style.opacity =curopacity;
SetTimeout (' Setobjclose () ', inttimestep);}
else {cursobj.style.display= ' none ';}
}
}
</SCRIPT>
<body>
<input type=text onclick= "startobjvisible (' objdiv '); if (this.value== ') {this.value= ' '}else{this.value= '} ' Value= "" >
<div id= "Objdiv" style= "Display:none;" ></DIV>
</body>