JS最原始封装素数,创建表格,改变样式,颜色等

深渊向深渊呼唤
<style>
    table{
        border-collapse: collapse;
    }
    th,td{
        border:1px solid #09f;
    }
  
    div{
        width:100px;
        height:100px;
        background-color:red;
        margin-top:20px;
    }
    #img{
        height:200px;
    }
 
</style>
  
</head>
<body>
      <button onclick="setStyle1('obj1','width','200px')">变宽</button>
      <button onclick="setStyle1('obj1','height','200px')">变高</button>
      <button onclick="setStyle1('obj1','background','green')">变色</button>
      <div ></div>
      <button onclick="setColor2(1)">变成红色</button>
      <button onclick="setColor2(2)">变成绿色</button>
      <button onclick="setColor2(3)">变成蓝色</button>
      <div ></div>

        
      <button onclick="switchImg()">切换图片</button>
        <div >
          <img  src="./pic/1.jpg">
      </div>
       
         <button onclick="switchZimu1()">顺时针切换字母</button>
         <button onclick="switchZimu2()">逆时针切换字母</button>
        <div >
          A
      </div>
</body>
</html>
    <script src="./JS/sushu.js"></script>

  JS最原始封装素数,创建表格,改变样式,颜色等

栏目