摘要: 属性操作 属性操作就是给标签增加删除等的操作 1.js操作属性 1.增 node.setAttribute('k','v'); 2.查 node.getAttribute('k'); 2.删 node.removeAttribute('k'); 2.jQuery操作属性 1. 查 jQuery对象. 阅读全文
posted @ 2023-04-19 21:31 DRAMA-娜娜 阅读(36) 评论(1) 推荐(0) 编辑
摘要: 属性操作 属性操作就是给标签增加删除等的操作 1.js操作属性 1.增 node.setAttribute('k','v'); 2.查 node.getAttribute('k'); 2.删 node.removeAttribute('k'); 2.jQuery操作属性 1. 查 jQuery对象. 阅读全文
posted @ 2023-04-19 21:27 DRAMA-娜娜 阅读(10) 评论(0) 推荐(0) 编辑
摘要: 事件 事件可以理解为:给HTML标签添加了一些额外的功能,并且能够触发JS的代码运行 1.事件就是达到某个触发条件,自动触发的动作 2.常用的事件 1.onclick:当用户点击某个对象是调用的事件句柄 2.onfoucus:元素获取焦点 3.onblur:元素失去焦点 4.onchange:域的内 阅读全文
posted @ 2023-04-19 21:17 DRAMA-娜娜 阅读(53) 评论(0) 推荐(0) 编辑