- 博客(5)
- 收藏
- 关注
原创 获取样式的封装函数
//封装一个获取样式的方法 function getSty(obj, property) { var sty = obj.style[property]; if (sty == '') { sty = window.getComputedStyle(obj, null)[property]; } return sty; } //简化
2021-01-28 17:40:10
149
原创 ajax封装
function ajax(options){ const {url, data, type, success, error, timeout, complate} = options; var xml = new XMLHttpRequest(); let method = type.toUpperCase(); if(method === 'GET'){ xml.open(m
2021-01-20 21:23:26
146
原创 防抖和节流
#app{ width: 300px; height: 300px; background-color: red; }``<div id="app"></div>```javascript const oApp=document.getElementById('app'); oApp.οnmοusemοve=function(){ debounce.
2021-01-20 20:01:20
102
1
原创 CSS实现选项卡
<nav> <a href="#div1">111</a> <a href="#div2">222</a> <a href="#div3">333</a> </nav> <div> <section id="div1">11111</section> <section id=
2021-01-19 19:40:00
316
原创 轮播图
<div> <img src="./1.png" alt="" id="img" width="200" height="150"> <button onclick="prev();">上一`在这里插入代码片`个</button> <button onclick="next();">下一个</button> </div><script> var arr
2021-01-19 19:34:36
108
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人