<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<script src="http://static01.baomihua.com/js/core/jquery-1.8.3.min.js?t=20150327.js"></script>
</head>
<body>
<ul id="list1">
ul
<li>
li
<span>span</span>
</li>
</ul>
<ul id="list2">
ul
<li>
li
<span>span</span>
</li>
</ul>
<script>
$('#list1').on('click', 'span', function(event) {
console.log(event.currentTarget.innerHTML)
console.log(event.target.innerHTML)
})
$('#list2').on('click', function(event) {
console.log(event.currentTarget.innerHTML)
console.log(event.target.innerHTML)
console.log($(event.target).closest('li').html())
})
</script>
</body>
</html>

closest的更多相关文章

  1. [LeetCode] Closest Binary Search Tree Value II 最近的二分搜索树的值之二

    Given a non-empty binary search tree and a target value, find k values in the BST that are closest t ...

  2. [LeetCode] Closest Binary Search Tree Value 最近的二分搜索树的值

    Given a non-empty binary search tree and a target value, find the value in the BST that is closest t ...

  3. [LeetCode] 3Sum Closest 最近三数之和

    Given an array S of n integers, find three integers in S such that the sum is closest to a given num ...

  4. ICP算法(Iterative Closest Point迭代最近点算法)

    标签: 图像匹配ICP算法机器视觉 2015-12-01 21:09 2217人阅读 评论(0) 收藏 举报 分类: Computer Vision(27) 版权声明:本文为博主原创文章,未经博主允许 ...

  5. Leetcode 16. 3Sum Closest

    Given an array S of n integers, find three integers in S such that the sum is closest to a given num ...

  6. LeetCode:3Sum, 3Sum Closest, 4Sum

    3Sum Closest Given an array S of n integers, find three integers in S such that the sum is closest t ...

  7. K closest points

    Find the K closest points to a target point in a 2D plane. class Point { public int x; public int y; ...

  8. 16. 3Sum Closest

    题目: Given an array S of n integers, find three integers in S such that the sum is closest to a given ...

  9. jquery:closest和parents的主要区别

    closest和parents的主要区别是:1,前者从当前元素开始匹配寻找,后者从父元素开始匹配寻找:2,前者逐级向上查找,直到发现匹配的元素后就停止了,后者一直向上查找直到根元素,然后把这些元素放进 ...

  10. Leetcode 3Sum Closest

    Given an array S of n integers, find three integers in S such that the sum is closest to a given num ...

随机推荐

  1. 一个操作Sql2005数据库的类(备份,还原,分离,附加,添加删除用户等操作)(转载)

    /* * 更新时间 :2011-09-01 16:06 * 更 新 人 :苏飞 */ using System; using System.Collections.Generic; using Sys ...

  2. sql存储过程通过ID删除两表中的数据。

    CREATE OR REPLACE PROCEDURE del_p --建立名为del_p 的过程 IS CURSOR get_abid --简历名为get_abid的cursor 用来存放a表的id ...

  3. Socket 错误一览表

    出现网络联机错误Socket error #11001 表示您的计算机无法连上服务器,请检查您的Proxy设定以及Proxy相关账号,或暂时取消您防毒软件的「个人防火墙」. · 出现网络联机错误Soc ...

  4. fiddler接口测试

    浏览器中,可直接进行get接口测试:调用post方法的接口测试可用fiddler测试(当然,fiddler也支持get),如下图 [Execute]后双击左侧请求记录记录即可查看响应结果

  5. (九)Struts2 防重复提交

    所有的学习我们必须先搭建好Struts2的环境(1.导入对应的jar包,2.web.xml,3.struts.xml) 第一节:重复提交示例演示 struts.xml <?xml version ...

  6. UITabBar-UITabBarItem图片的背景颜色属性和文字的颜色大小设置

    UITabBarItem设置的图片选中状态下默认的是蓝色,如何改变它的颜色为图片自带的颜色呢? typedef NS_ENUM(NSInteger, UIImageRenderingMode) { / ...

  7. 利用反射把查询到的Table、Reader转换成List、Model

    菜鸟一枚,入园已有两年三个月,这还是第一次写博客,请各位大神斧正. 这是我写的一个工具类,通常我们从数据库查询到一个  DataReader  或者是  一个 Table , 想要转换成 一个 lis ...

  8. 简单的背包问题(入门)HDU2602 HDU2546 HDU1864

    动态规划,我一直都不熟悉,因为体量不够,所以今天开始努力地学习学习. 当然背包从01开始,先选择了一个简单的经典的背包HDU2602. Many years ago , in Teddy's home ...

  9. 过滤HTML

    过滤HTML public static string NoHTML(string html){ string[] strArray2 = new string[] { "font" ...

  10. 20 Valid Parentheses(匹配括号)

    题目意思:判断一个字符串(){}[]是否符合 思路:用栈ps:实习一个多月了,代码也刷不动了,状态真不是一般的差 class Solution { public: bool isValid(strin ...