摘要:
鼠标事件类型 click:当用户点击某个对象时调用的事件句柄。 dbclick:当用户双击某个对象时调用的事件句柄。 mousedown:鼠标按钮被按下。 mouseup:鼠标按键被松开 mouseover:鼠标移到某元素之上 //进入它的子元素也会触发 mouseout:鼠标从某元素移开 //进入 阅读全文
posted @ 2020-01-22 17:31
JaydenQiu
阅读(200)
评论(0)
推荐(0)
摘要:
固有属性(property) 自定义属性(atrributes) <div id="ml" xx="xx" a="b"> 获取div的xx属性值 console.log(div.attributes.getNamedIteam('xx').nodeValue); console.log(div.at 阅读全文
posted @ 2020-01-22 15:06
JaydenQiu
阅读(198)
评论(0)
推荐(0)
摘要:
创建节点 document.write(创建任意内容,并写入) document.write('<h1>添加到html中的文本</h1>'); docement.createElement(创建元素) var jd = document.createElement('li'); //创建一个li元素 阅读全文
posted @ 2020-01-22 14:25
JaydenQiu
阅读(148)
评论(0)
推荐(0)