发布网友 发布时间:2022-04-23 02:22
共3个回答
热心网友 时间:2022-04-24 07:18
<script>
window.onload = function(){
var el = document.getElementById('元素ID');
el.onmouseover = function(){
el.style.border = 'solid 1px red';
};
el.onmouseout = function(){
el.style.border = '';
}
}
</script>
热心网友 时间:2022-04-24 08:36
<script type="text/javascript">
function ShowBorder(a)
{
a.style.border = "1px solid black";
}
function HideBorder(a)
{
a.style.border = "0px";
}
</script>
<div onmouseover="ShowBorder(this)" onmouseout="HideBorder(this)">测试</div>
热心网友 时间:2022-04-24 10:10
这个需要用到document对象中得方法的,你可以找找文档....