Pārlūkot izejas kodu

去掉test目录

pancy 1 gadu atpakaļ
vecāks
revīzija
3c2dd80eb8

+ 0 - 34
gl/gl/src/test/BOM.html

@@ -1,34 +0,0 @@
-<!DOCTYPE html>
-<html>
-
-<head>
-  <meta charset="UTF-8">
-  <title></title>
-</head>
-
-<body>
-<button onclick="set()">设置本地存储</button>
-<button onclick="get()">获取本地存储</button>
-<button onclick="deleteByKey()">删除某个本地存储</button>
-<button onclick="clearAll()">清空所有本地存储</button>
-
-</body>
-<script type="text/javascript">
-  function set() {
-    localStorage.setItem("name", "jack");
-  }
-  function get() {
-    console.log(localStorage.getItem("name"))
-  }
-
-  function deleteByKey() {
-    localStorage.removeItem("name")
-  }
-
-  function clearAll() {
-    localStorage.clear();
-  }
-
-</script>
-
-</html>

+ 0 - 25
gl/gl/src/test/bindEvent.html

@@ -1,25 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-  <meta charset="UTF-8">
-  <title>阻止事件的默认行为</title>
-  <script type="text/javascript">
-    //IE:window.event.returnValue = false;
-    //W3C:传递过来的对象.preventDefault();
-    function fun(e){
-      //W3C
-      if(e && e.preventDefault){
-        alert("W3C");
-        e.preventDefault();
-      }else{
-        alert("IE");
-        window.event.returnValue = false;
-      }
-    }
-  </script>
-</head>
-<body>
-<a href="15-onload事件.html" onclick="fun(event)">点我啊</a>
-</body>
-</html>
-

+ 0 - 48
gl/gl/src/test/click.html

@@ -1,48 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-<head>
-    <meta charset="UTF-8">
-    <title>Title</title>
-</head>
-<body>
-<script type="text/javascript">
-    //将图片名称放到数组中
-    let imgObj = {
-        imgs:["images/1.png","images/2.png","images/3.png"]
-    };
-
-    let num = 0;//数组的下标,0-2
-    function prev(){
-        //1)找到img标签
-        let imgEle = document.getElementsByTagName("img")[0];
-        //2、给img标签的SRC属性赋值
-        num--;
-        //从后面重新开始展示图片
-        if(num<0){
-            num = 2;
-        }
-        let url = imgObj.imgs[num];
-        imgEle.src=url;
-    }
-
-    function next(){
-        //1)找到img标签
-        let imgEle = document.getElementsByTagName("img")[0];
-        //2、给img标签的SRC属性赋值
-        num++;
-        //从前面重新开始展示图片
-        if(num>2){
-            num = 0;
-        }
-        let url = imgObj.imgs[num];
-        imgEle.src=url;
-
-    }
-</script>
-<button style="height: 150px;width: 50px" onclick="prev()"> &lt; </button>
-
-<img src="images/1.png" width="600px" height="450px" style="position: relative;top:70px">
-
-<button style="height: 150px;width: 50px" onclick="next()"> &gt; </button>
-</body>
-</html>

BIN
gl/gl/src/test/images/1.png


BIN
gl/gl/src/test/images/2.png


BIN
gl/gl/src/test/images/3.png