![](https://img-blog.csdnimg.cn/20190927151124774.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
JS + TS
实用案例及文章
寒枫落林
From Zero To Hero.
展开
-
原生JS--获取DOM元素
获取DOM元素的方法:通过id获取<div id="box"></div><script> let box= document.getElementById("box");</script>1234注意:getElementById()括号中的不需要在前面加“#”,因为方法就决定了括号中的值是一个元素的id值。该方法返回一个DOM对象。2. 通过class获取<div class="box"></d..转载 2021-12-20 13:03:00 · 703 阅读 · 0 评论 -
cookie.ts(工具)
/* eslint-disable @typescript-eslint/prefer-for-of *//* eslint-disable eqeqeq *//** * @file cookie * @param {getCookie} 获取cookie * @param {deleteCookie} 删除cookie * @param {addCookie} 添加cookie */function addCookie(cookieKey: any, cookieValue: strin.原创 2022-07-08 19:32:52 · 600 阅读 · 0 评论