zoukankan      html  css  js  c++  java
  • 传参-this的使用

    <!DOCTYPE html>
    <html>
        <head>
            <meta charset="UTF-8">
            <title></title>
            <style type="text/css">
                .one{
                    background-color: lightcyan;
                    width: 80px;
                    height: 30px;
                    border: 1px solid lightcyan;
                    float: left;
                    padding-bottom: 20px;
                    margin: 5px;
                    text-align: center;
                    line-height: 30px;            
                    }
                .one:hover{
                        cursor: pointer;
                    }
                .two{
                    background-color: blue;
                    width: 1000px;
                }
            </style>
        </head>
        <body>
            <div id="">
                <div class="one" onmouseover="aa(this)">栏目一</div>
                <div class="one" onmouseover="aa(this)">栏目二</div>
                <div class="one" onmouseover="aa(this)">栏目三</div>
                <div class="one" onmouseover="aa(this)">栏目四</div>
                <br />
                <br />
                <br />
                <div class="two">
                    
                </div>
            </div>
        </body>
    </html>
    <script type="text/javascript">
        function aa(a){
            var two = document.getElementsByClassName("two")[0];
            two.innerHTML = "";
            for(var i = 0;i < 4; i++){
                two.innerHTML += a.innerHTML + "的内容<br/>";
            }
            
        }
    </script>
  • 相关阅读:
    文本标记
    第一个HTML文档
    HTML入门
    bootstrap fileinput 文件上传
    DPDK rte_hash 简述
    glib学习笔记-基本知识
    linux常用网络命令
    libevent学习过程
    C语言 singleton模式
    oracle命令行导出、导入dmp文件
  • 原文地址:https://www.cnblogs.com/yelena-niu/p/8858979.html
Copyright © 2011-2022 走看看