美文网首页
Function Hover Case

Function Hover Case

作者: Jadon7 | 来源:发表于2018-10-06 22:40 被阅读0次
    <div id="rectangle" onmouseover="her()" onmouseout="ovher()"></div>
    
    #rectangle{
      width:100px;
      height:100px;
      background-color:red;
    }
    
    var hRectangle=document.getElementById('rectangle').style;
    function her()
    {
      hRectangle.width='200px';
      hRectangle.height = '200px';
      hRectangle.background='#ccc';
    }
    function ovher()
    {
      hRectangle.width='100px';
      hRectangle.height = '100px';
      hRectangle.background='red';
    }
    

    相关文章

      网友评论

          本文标题:Function Hover Case

          本文链接:https://www.haomeiwen.com/subject/pdlzoftx.html