zoukankan      html  css  js  c++  java
  • js 层的显示和隐藏

    <!DOCTYPE html>


    <html lang="en" xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta charset="utf-8" />
        <title></title>
        <style>
            #dv {
                100px;
                height:100px;
                border:1px solid red;
            }
        </style>
        <script>
            onload = function () {
                document.getElementById('btnShow').onclick = function () {
                    var dv = document.getElementById('dv');
                    if (this.value == '隐藏') {
                        this.value = '显示';
                        dv.style.display = 'none';


                    } else {
                        this.value = '隐藏';
                        dv.style.display = 'block';
                    }

                }
            }
        </script>
    </head>
    <body>
        <input type="button" name="name" value="隐藏" id="btnShow"/>
        <div id="dv">
            123
        </div>
    </body>
    </html>
  • 相关阅读:
    poj2752Seek the Name, Seek the Fame【kmp next数组应用】
    poj1961Period【kmp next数组】
    poj2406(kmp next数组)
    KMP原理
    0529
    0428
    2045年4月25日
    0421
    黄金连分数【大数】
    学习linux内核时常碰到的汇编指令(1)
  • 原文地址:https://www.cnblogs.com/dxmfans/p/9434718.html
Copyright © 2011-2022 走看看