摘要: https://blog.csdn.net/qq_47008195/article/details/107443670 阅读全文
posted @ 2020-10-09 13:53 webpon 阅读(93) 评论(0) 推荐(0) 编辑
摘要: 1.document.write( ) 2.element.innerHTML 3.document.createElement(' ') 区别: 1、document.write是直接将内容写入页面的内容流,但是文档流执行完毕,则它会导致页面全部重绘 2、innerHTML是将内容写入某个DOM节 阅读全文
posted @ 2020-10-09 13:18 webpon 阅读(163) 评论(0) 推荐(0) 编辑
摘要: https://baijiahao.baidu.com/s?id=1664744998641129905&wfr=spider&for=pc 阅读全文
posted @ 2020-10-09 11:20 webpon 阅读(153) 评论(0) 推荐(0) 编辑
摘要: 1:设置自定义属性(html5中设置自定义属性用“data-”开头,多个字母用 “-” 连接) 1、元素.setAttribute('自定义属性名',自定义属性值) 2、<!-- Html5规定,给元素自定义数据属性时,属性名称以data-开头,但是真正的属性名不包括data > <p id="p1 阅读全文
posted @ 2020-10-09 10:55 webpon 阅读(303) 评论(0) 推荐(0) 编辑