05 2023 档案
摘要:first-of-type, last-of-type, nth-of-type, nth-last-of-type 选择器的用法和我们想象的不一样,可以说是不合常理它们的用法相同,就以 nth-of-type 举例 :nth-of-type(1) 选择同类型标签元素的第1个 p:nth-of-ty
阅读全文
摘要:1. 表单控件的form属性 <form id="user_form" method="get"> </form> <div> 年龄: <input name="age" form="user_form"></> </div> 外部元素可以与非父级表单关联表单提交,可以携带表单外部元素的值 2. 提
阅读全文
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv
阅读全文
摘要:1. 无参绑定 <div onclick="onClick()" ></div> 2. 传入源dom对象 <div onclick="onClick(this)" ></div> 3. 传入事件对象 <div onclick="onClick(event)" ></div>
阅读全文
摘要:1. web components 不能自闭合,例如 <fat-page-item />这样不行,如果后面有拼接的话,它会嵌套后面的内容 2. web components 的attribute必须小写,否则在attributeChangedCallback中监听不到变化
阅读全文