![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
DOM
黑夜来袭Z
这个作者很懒,什么都没留下…
展开
-
BOM中的Location.hash用法
一、当前页面:可以通过location.hash进行设置 location.hash = 'sss' console.log(location.hash);设置后可以通过location.hash访问会将该值拼接到url上用法:在要跳转的html元素上设置name属性,然后设置location.hash值就可以实现页面内跳转。注意:如果跳转后如果location.hash不清空就无法继续跳转。<html><head>原创 2020-11-25 15:19:35 · 380 阅读 · 0 评论 -
DOM
一、获取元素在集合中下标的方法(伪代码)。1、设置自定义属性Element.setAttribute(name,value)2、通过为对象添加属性的方式element.index = value3、通过each方法collection.each(index,val)原创 2020-11-10 20:20:03 · 233 阅读 · 0 评论