- 浏览: 53074 次
- 性别:
- 来自: 深圳
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title> new document </title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="generator" content="editplus" /> <meta name="author" content="" /> <meta name="keywords" content="" /> <meta name="description" content="" /> </head> <body> </body> <script language="JavaScript" type="text/javascript"> <!-- var ul_val = document.createElement("ul"); for (var i = 0; i < 1000; i++) { var li_val = document.createElement("li"); li_val.innerHTML = (i + 1); ul_val.appendChild(li_val); } document.body.appendChild(ul_val); function getEventTarget(e) { e = e || window.event; return e.target || e.srcElement; } function editCell(e) { var target = getEventTarget(e); //其中target即是添加事件的dom元素 /*if (target.tagName.toLowerCase() === ‘td’) { // DO SOMETHING WITH THE CELL }*/ alert(target.innerHTML); } //function AttachEvent(target, eventName, handler, argsObject) { function AttachEvent(target, eventName, handler) { var eventHandler = handler; /*if (argsObject) { eventHander = function(e) { handler.call(argsObject, e); } }*/ //以上注释的代码不知道做什么 if (window.attachEvent){ //IE target.attachEvent("on" + eventName, handler); }else{ //FF target.addEventListener(eventName, handler, false); } } //AttachEvent(ul_val, "click", editCell, obj); AttachEvent(ul_val, "click", editCell); //--> </script> </html>
发表评论
-
JS的replace方法
2011-08-05 10:34 1202from http://www.cnblogs.com/mxw ... -
要写出在各大主流浏览器上都兼容的JS代码,就要关注他们的区别,下是IE和FF综合考虑的通用DOM!
2011-08-04 14:36 922来源于 http://hi.baidu.com/g ... -
<input type="text" id="start" />输入true取布尔true
2011-07-28 14:22 880"true" and true is di ... -
Js获取当前日期时间+日期验证+判断闰年+日期的天数差+日期格式化+JS判断某年某月有多少天
2011-07-27 17:47 4813字符串转日期型+Js当前日期时间+日期验证+判断闰年+日期的天 ... -
高效http页面优化法则一【JS对DOM的操作】
2011-07-08 10:58 1033很多人都认为JS的效率 ... -
form page jump
2011-07-07 10:49 854页面跳转 <input type="hidd ... -
jquery widget sample
2011-07-06 08:39 3447<!DOCTYPE html PUBLIC &quo ... -
jquery apply wait for update
2011-07-05 10:36 1658<!DOCTYPE html PUBLIC &quo ... -
JS中的attachEvent、addEventListener如何传递参数
2011-06-29 14:02 6268<!DOCTYPE html PUBLIC " ... -
window.onload 和 $(document).ready 区别 待续......
2011-06-27 09:50 2751jquery 学习之一(js中window ... -
js operate frame
2011-06-14 14:04 1193我的页面框架如下 <frameset rows=&quo ... -
js中frame的调用
2011-06-14 12:27 1044js中frame的调用 关键词 ... -
js 事件冒泡 和其它问题
2011-06-10 09:25 821js事件冒泡 <html> <head> ... -
js inner iframe get dom of parent
2011-06-02 15:00 732parent.$("#id");//jqu ... -
ajax
2011-05-27 14:18 646<!DOCTYPE html PUBLIC " ... -
add event to all the dom elements in one page except one dom
2011-05-18 10:20 870<!DOCTYPE html PUBLIC &quo ... -
count down 倒计时
2011-05-13 12:42 575<!DOCTYPE html PUBLIC " ... -
js IE与FireFox的兼容性问题 事件
2011-05-13 09:16 1030# window.event * IE:有windo ... -
deal with href remove the same element
2011-05-11 09:38 800var url="http://zhidao.bai ... -
document.form.item 问题集合的(0)和[0]取法
2011-05-09 15:10 1952<!DOCTYPE html PUBLIC " ...
相关推荐
Beginning JavaScript with DOM Scripting and Ajax is an essential resource for modern JavaScript programming. This completely updated second edition covers everything you need to know to get up-to-...
Beginning JavaScript with DOM Scripting and Ajax is for the person who has a good grasp of HTML and CSS but wants to add JavaScript to their skillset. If you want to learn some basic programming ...
HDR(高动态范围)摄影是一种技术,用于在一张图像中捕捉和再现场景的宽广亮度范围,这在现实生活中很常见,但传统相机往往难以捕捉。然而,HDR图像处理过程中可能会遇到一个问题,即“鬼影”现象。...
The Level 1 Specification was designed to deal with the following PHY layer interfaces : 1. 2. 3. 4. 5. 155.52 Mbps (SONET/OC-3c) 155.52 Mbps (8B/10B block coded) 100 Mbps (4B/5B TAXI) 44.1236 Mbps ...
【deal with / do with 的区别】 在高中英语学习中,理解和掌握 deal with 和 do with 这两个短语的用法是非常关键的。首先,两者都用于表示“处理”或“对付”的意思,但在搭配和使用上有明显的差异。 1) deal ...
This driver doesn t deal with the exact protocol used during the session. It is intended to be as simple as something like.
Enlighten your understanding about the flight by performing step-by-step pre-flight adjustments and acquiring the instructions for a safe flight Get the best tips to deal with performance issues ...
If your job is loaded with manual work, then why not write scripts that can deal with it for you? With this book, you will learn how to deal with many tasks such as zipping files, emailing colleagues...
Foundations for Analytics with Python by Clinton W. Brownley Copyright © 2016 Clinton Brownley. All rights reserved. Printed in the United States of America. Published by O’Reilly Media, Inc., 1005 ...
The book also contains a great deal of practical advice for code developers and users; it is designed to be equally useful to beginners and experts.The issues of numerical accuracy, estimation and ...
Many of Excel's 750 million users would like to do more with their data, such as repeating similar analyses over hundreds of files or combining the data in many files for analysis at one time....
At its core, Bayes' Theorem is a simple probability and statistics formula that has revolutionized how we understand and deal with uncertainty. If life is seen as black and white, Bayes' Theorem helps...
there has been an increasing interest in methods that deal with multiple outputs, motivated partly by frameworks like multitask learning. In this paper, we review different methods to design or learn ...
21. a good/great deal of: 修饰不可数名词,表示"大量",如 "She has a great deal of experience in teaching." 22. a good/great many: 修饰可数名词复数,表示"大量",如 "There are a great many students ...
"摸底考试作文垃圾处理how to deal with garbage"这一主题旨在引导学生深入理解这个问题,并探讨有效的解决策略。在撰写关于这一主题的文章时,我们需要遵循一些关键原则,避免解题大忌,如混淆文体、无草稿以及死板...
安装simpl_windows_2.08.41前需称安装simpl_plus_cross_compiler和crestron_database,最后安装vt_pro-e 工具
But finding algorithms and designing and building platforms that deal with large sets of data is a growing need. Data scientists have to manage and maintain increasingly complex data projects, and ...