zoukankan
html css js c++ java
原生js事件篇
1、给新创建的元素添加事件
给ul下新创建的所有li添加事件,此时li本身添加事件是无效的,只有将事件源绑定到父元素身上然后通过(e.target)才能找到当前所点击的目标元素;代码如下:
oUl.addEventListener("click", function(e){
e=e || window.event;//兼容ie
alert(e.target.innerText);
})
未完待续。。。。。。
查看全文
相关阅读:
ExtJs 4.0 ExtJs2.2 JavaScript
C++中关于classview、resourceview、fileview
BIN OBJ 区别
数据编码
多线程
REST
SQL Server 2005安装
临时
数据存储
灰度直方图
原文地址:https://www.cnblogs.com/crazyWang/p/9560635.html
最新文章
文件流之字节缓冲流(BufferedInputStream BufferedOutputStream)
Jenkins中集成Gcov代码覆盖率报告
CMake如何执行shell命令
LCOV 如何过滤iostream等系统函数的覆盖率信息
cmake 学习笔记(一)
显示ubuntu 10.4右上角网络图标
ubuntu 10.4非法关机后上不了网
安装交叉编译器arm-linux-gcc
linux内核驱动——从helloworld开始
ubuntu删除该目录下所有*.svn
热门文章
一个查询ip地址的mysql数据库--ip2nation
casperjs,phantomjs,slimerjs and spooky
phpDocumentor
语义化版本
Promise & Deferred Objects in JavaScript Pt.2: in Practice
Promise & Deferred objects in JavaScript Pt.1: Theory and Semantics.
html5 js 游戏的一篇博客 貌似不错
Fix for: Permission denied to access property 'toString'
nginx alias
laravel 资料
Copyright © 2011-2022 走看看