一个图片淡入淡出实例的代码
代码如下:
<HTML>
<HEAD>
<TITLE>淡入淡出</TITLE>
<SCRIPT>
<!--
function fadeOut(obj)
{
obj.style.filter="blendTrans(duration=2)";
if ((obj.visibility != "hidden") &&
(obj.filters.blendTrans.status != 2))
{
obj.filters.blendTrans.Apply();
obj.style.visibility="hidden";
obj.filters.blendTrans.Play();
}
}
function fadeIn(obj)
{
obj.style.filter="blendTrans(duration=2)";
if ((obj.visibility != "visible") &&
(obj.filters.blendTrans.status != 2))
{
obj.filters.blendTrans.Apply();
obj.style.visibility="visible";
obj.filters.blendTrans.Play();
}
}
-->
</SCRIPT>
</HEAD>
<BODY>
<IMG id=oImg src="/images/logo.gif"></IMG>
<P>
<BUTTON onclick="fadeOut(oImg)">Fade Image Out</BUTTON>
<BUTTON onclick="fadeIn(oImg)">Fade Image In</BUTTON>
</P>
<HR>
</BODY>
</HTML>
请问这里面的obj.filters.blendTrans.status指的是什么,为什么开始时它的值为0,执行完函数后值变成了2
代码如下:
<HTML>
<HEAD>
<TITLE>淡入淡出</TITLE>
<SCRIPT>
<!--
function fadeOut(obj)
{
obj.style.filter="blendTrans(duration=2)";
if ((obj.visibility != "hidden") &&
(obj.filters.blendTrans.status != 2))
{
obj.filters.blendTrans.Apply();
obj.style.visibility="hidden";
obj.filters.blendTrans.Play();
}
}
function fadeIn(obj)
{
obj.style.filter="blendTrans(duration=2)";
if ((obj.visibility != "visible") &&
(obj.filters.blendTrans.status != 2))
{
obj.filters.blendTrans.Apply();
obj.style.visibility="visible";
obj.filters.blendTrans.Play();
}
}
-->
</SCRIPT>
</HEAD>
<BODY>
<IMG id=oImg src="/images/logo.gif"></IMG>
<P>
<BUTTON onclick="fadeOut(oImg)">Fade Image Out</BUTTON>
<BUTTON onclick="fadeIn(oImg)">Fade Image In</BUTTON>
</P>
<HR>
</BODY>
</HTML>
请问这里面的obj.filters.blendTrans.status指的是什么,为什么开始时它的值为0,执行完函数后值变成了2