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