?? ? <script type="text/javascript">?? ? ? ? function hidetext() ? { ? var mychar = document.getElementById("con").style.display=none; } ? ????????function showtext() ? { ? var mychar = document.getElementById("con").style.display=block; }? ? </script>?</head>?<body> ?? ? <h1>JavaScript</h1> ?? ? <p id="con">做為一個(gè)Web開發(fā)師來說,如果你想提供漂亮的網(wǎng)頁、令用戶滿意的上網(wǎng)體驗(yàn),JavaScript是必不可少的工具。</p>?? ? <form>? ? ? ?<input type="button" onclick="hidetext()" value="隱藏內(nèi)容" />?? ? ? ?<input type="button" onclick="showtext()" value="顯示內(nèi)容" />?? ? </form></body>?
教程里這段代碼為何無法實(shí)現(xiàn)原本的效果?JS入門
qq_光明_5
2015-11-17 20:16:58