回覆列表
  • 1 # 小紅的甜心

    <body>

    <div>

    <input type="text" /></div>

    <br />

    </body>

    <script type="text/javascript">

    function click() {

    var attr = document.getElementById("btn").attributes["values"];

    var value = attr.value;

    if (value == "1") {

    document.getElementById("txt").style.display = "none";

    attr.value = "2";

    }

    else if (value == "2") {

    document.getElementById("txt").style.display = "block";

    attr.value = "1";

    }

    }

    window.onload=function(){

    var btn=document.getElementById("btn");

    btn.onclick=function(){click();};

    };

    </script>

  • 中秋節和大豐收的關聯?
  • 三角函式如何轉變為反三角函式?