Posted in Javascript onJune 26, 2006
<SCRIPT LANGUAGE="JavaScript">
<!--
function TagSample(s)
{
var source=event.srcElement;
if (source.tagName.toUpperCase() == "IMG")
{
if (s == 1)
{
source.style.border="1px solid #0000FF";
}
else
{
source.style.border="";
}
}
}
//-->
</SCRIPT>
<div onMouseOver="TagSample(1)" onMouseOut="TagSample(0)">
<IMG SRC="images/logo.gif" WIDTH="190" HEIGHT="70" BORDER="0" ALT="">
</div>
<!--
function TagSample(s)
{
var source=event.srcElement;
if (source.tagName.toUpperCase() == "IMG")
{
if (s == 1)
{
source.style.border="1px solid #0000FF";
}
else
{
source.style.border="";
}
}
}
//-->
</SCRIPT>
<div onMouseOver="TagSample(1)" onMouseOut="TagSample(0)">
<IMG SRC="images/logo.gif" WIDTH="190" HEIGHT="70" BORDER="0" ALT="">
</div>
tagName的使用,留一笔
声明:登载此文出于传递更多信息之目的,并不意味着赞同其观点或证实其描述。
Reply on: @reply_date@
@reply_contents@