xml實現文字變色
文件1名: test.html
<head>
<style>
h1 {behavior:url(behave.htc)}
</style>
</head>
<h1>看看能不能變色</h1>
文件2名:behave.htc
<component>
<attach for="element" event="onmouseover"
handler="hig_lite" />
<attach for="element" event="onmouseout"
handler="low_lite" />
<script type="text/javascript">
function hig_lite()
{
element.style.color=255
}
function low_lite()
{
element.style.color=0
}
</script>
</component>
<head>
<style>
h1 {behavior:url(behave.htc)}
</style>
</head>
<h1>看看能不能變色</h1>
文件2名:behave.htc
<component>
<attach for="element" event="onmouseover"
handler="hig_lite" />
<attach for="element" event="onmouseout"
handler="low_lite" />
<script type="text/javascript">
function hig_lite()
{
element.style.color=255
}
function low_lite()
{
element.style.color=0
}
</script>
</component>
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章
XML形式文檔的格式化--主要包括縮進和去空白
xingyuner2
2020-07-08 12:24:41
C++各大名庫之XML
wz7654321
2020-07-08 06:35:09
HTML 實現排行榜
Joker_PL
2020-07-08 09:11:56
1upx border在某些手機機型上某一邊框顯示不出來解決方案
Syleapn
2020-07-08 07:53:02
ES6中數組複製與合併
Syleapn
2020-07-08 07:15:13
HTML(超鏈接,建立錨點,建立圖像,圖像地圖)
sysydesign
2020-07-08 06:12:45
js 彈出層
iteye_16047
2020-07-08 04:09:44
CSS實現button按鈕閃爍效果
橘猫猫猫猫丶
2020-07-08 04:09:33
CSS+JS實現瀏覽器不保存用戶名密碼
橘猫猫猫猫丶
2020-07-08 04:09:33
HTML超文本標記語言學習2.--層疊樣式表的使用
披星戴月观日
2020-07-08 03:15:51
dom.onclick 與 的區別
function test(){alert(this)}cc={}cc.aa=test;cc.bb=function (){test()}cc.aa(
iteye_4926
2020-07-08 03:15:00