js更改HTML樣式


<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <title>window.open</title>
<script type="text/javascript">
  function a(){var b=confirm("你是否要進入斗魚")
  if(b==true){
    var c=prompt("請輸入斗魚地址")
    if(c!=null){
    a=window.open(c,'_blank','width=3000,height=2000,menubar=yes,toolbar=yes, status=yes,scrollbars=yes');
    }
             }
  
              }
            
   function wopen(){dd=window.open("https://hao.360.cn/?safe")}
   function Wclose(){
   
     a.close() 
   }
  </script>
  </head>
<body>
    <input name="button" type="button" onClick="a()" value="點擊輸入你想瀏覽的網頁" / >
    <input name="button" type="button" onClick="Wclose()" value="點擊關閉網頁" / >
    <p id="js">
      heollo
  </p>
  <script type="text/javascript">
  var cs=document.getElementById("js");
  cs.style.color="red";
   cs.style.background="#00ffff"
  </script>
      
  </body>
</html>


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM