[js小技巧]鼠標移到圖片高亮度顯示
關鍵代碼:
????<style?type="text/css"?>
.ComponentImage

{
}{
????cursor:hand;
????filter:progid:DXImageTransform.Microsoft.Alpha(?Opacity=0,?FinishOpacity=75,?Style=2,?Enabled='false');
}
</style>
????<script>
????????
????????//鼠標移上來。高亮度顯示
function?Highlight(obj)

?
{?
?????if?(obj.filters.length?>?0)

??????
{
??????????????obj.filters(0).enabled?=?'true';?
??????}
?????}
?????
?
function?UnHighlight(obj)

?
{
?????????if?(obj.filters.length?>?0)

?????????????
{
??????????????????obj.filters(0).enabled?=?'false';
?????????????}
??}
????????</script>

所有代碼
<html>
????<head>
????<title>
???????????test?page.
????</title>

????<style?type="text/css"?>
.ComponentImage

{
}{
????cursor:hand;
????filter:progid:DXImageTransform.Microsoft.Alpha(?Opacity=0,?FinishOpacity=75,?Style=2,?Enabled='false');
}
</style>

????<script>
????????
????????//鼠標移上來。高亮度顯示
function?Highlight(obj)

?
{?
?????if?(obj.filters.length?>?0)

??????
{
??????????????obj.filters(0).enabled?=?'true';?
??????}
?????}
?????
?
function?UnHighlight(obj)

?
{
?????????if?(obj.filters.length?>?0)

?????????????
{
??????????????????obj.filters(0).enabled?=?'false';
?????????????}
??}
????????</script>
</head>

????<body>
????????
????????<img?src="http://www.aygfsteel.com/images/logo.gif"?class="ComponentImage"?onmouseover="Highlight(this);"?onmouseout="UnHighlight(this);"?>
????????<br>
????????<font?color=red>鼠標移上來看看效果</font>
</html>


注:不支持fireFox































































































注:不支持fireFox
posted on 2006-11-01 15:39 record java and net 閱讀(2187) 評論(3) 編輯 收藏 所屬分類: xml and html