JavaScript使网页显示动态效果并实现与用户交互功能。

xiaoxiao2021-02-28  11

<!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>style样式</title> </head> <body>   <h2 id="con" οnclick="kk()">I love JavaScript</H2>   <p> JavaScript使网页显示动态效果并实现与用户交互功能。</p>   <script type="text/javascript">   var ss= document.getElementById("con");  ss.style.color="red";  ss.style.backgroundColor="#ccc";  function kk()  {      ss.style.display="none";  }     </script> </body> </html>
转载请注明原文地址: https://www.6miu.com/read-250362.html

最新回复(0)