<!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. boost.log要点笔记

    span.kw { color: #007020; font-weight: bold; } code > span.dt { color: #902000; } code > span. ...

  2. PHP 根据值查找键名

    array_search (PHP 4 >= 4.0.5, PHP 5) mixed array_search ( mixed $needle , array $haystack [, bool ...

  3. mysql的账户失效,之前的密码无法登录

     引用自:http://blog.sina.com.cn/s/blog_682c287b0100ofz8.html 此为linux服务器下的做法 方法一: 1.关闭mysql    # service ...

  4. matlab中find 函数如何使用

    find函数用于返回所需要元素的所在位置 (位置的判定:在矩阵中,第一列开始,自上而下,依次为1,2,3...,然后再从第二列,第三列依次往后数) 举例: ①find(A)返回矩阵A中非零元素所在位置 ...

  5. a*b(高进度乘以int类型的数)

    以下是我今日的a-b(高精度)的程序,\(^o^)/偶也偶也偶也偶也! 程序: #include<stdio.h> #include<string.h> char s[1000 ...

  6. [Machine Learning] Probabilistic Graphical Models:一、Introduction and Overview(2、Factors)

    一.什么是factors? 类似于function,将一个自变量空间投影到新空间.这个自变量空间叫做scope. 二.例子 如概率论中的联合分布,就是将不同变量值的组合映射到一个概率,概率和为1. 三 ...

  7. php完整验证码代码

    <?php require_once 'string.func.php'; //通过GD库做验证码 /** *添加验证文字 * @param int $type * @param int $le ...

  8. Linux 防火墙设置,禁止某个ip访问

    service  iptables  status        查看防火墙状态 service  iptables  start           开启防火墙 service  iptables  ...

  9. PHP实现简易的模板引擎

    PHP实现简易的模板引擎 1.MVC简介 MVC 是一种使用 MVC(Model View Controller 模型-视图-控制器)设计创建 Web 应用程序的模式(详情自己百度): 1. Mode ...

  10. Python【第一篇】基础介绍

    一.本节主要内容 Python介绍 发展史 Python 2 or 3? 安装 Hello World程序 变量 用户输入 模块初识 .pyc文件 数据类型初识 数据运算 表达式if ...else语 ...