欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

使用JavaScript動態(tài)設(shè)置樣式實現(xiàn)代碼及演示動畫

 更新時間:2013年01月25日 09:49:34   作者:  
使用onmouseover和onmouseout事件實現(xiàn)不同的效果而且是使用js動態(tài)實現(xiàn),本文有利于鞏固你js與css方面的知識,感興趣的你可以了解下哦,希望本文對你有所幫助
今天做了一個css的練習(xí),效果有點象Maxthon首頁一樣。使用onmouseover和onmouseout事件實現(xiàn)不同的效果。如:

你可以使用下面javascript。
復(fù)制代碼 代碼如下:

<script type="text/javascript">
function DynamicSetStyle(id, attr, val) {
var element = document.getElementById(id);
if (element) element.style[attr] = val;
}
</script>

fieldset應(yīng)用上面的javascript的DynamicSetStyle方法。
復(fù)制代碼 代碼如下:

<fieldset id="fs1" style="margin: 10px; padding: 10px; width: 170px; text-align: center;"
onmouseover="DynamicSetStyle('fs1','border-color','#3599ff')" onmouseout="DynamicSetStyle('fs1','border-color','')">
ERP
<a target="_blank">http://xxx.xxx.com/erp </a>
</fieldset>

相關(guān)文章

最新評論