tagName的使用,留一笔

来源:互联网 时间:2016-03-23

<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>

相关阅读:
Top