惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

B
Blog
C
Cybersecurity and Infrastructure Security Agency CISA
Microsoft Security Blog
Microsoft Security Blog
B
Blog RSS Feed
云风的 BLOG
云风的 BLOG
G
Google Developers Blog
Recent Announcements
Recent Announcements
A
About on SuperTechFans
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Google Online Security Blog
Google Online Security Blog
Google DeepMind News
Google DeepMind News
S
Schneier on Security
S
Secure Thoughts
T
The Exploit Database - CXSecurity.com
Martin Fowler
Martin Fowler
P
Proofpoint News Feed
Security Latest
Security Latest
Jina AI
Jina AI
D
Darknet – Hacking Tools, Hacker News & Cyber Security
Recorded Future
Recorded Future
T
Tor Project blog
有赞技术团队
有赞技术团队
H
Hackread – Cybersecurity News, Data Breaches, AI and More
N
News | PayPal Newsroom
博客园 - 三生石上(FineUI控件)
MyScale Blog
MyScale Blog
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Last Week in AI
Last Week in AI
F
Full Disclosure
Hacker News: Ask HN
Hacker News: Ask HN
Forbes - Security
Forbes - Security
D
DataBreaches.Net
人人都是产品经理
人人都是产品经理
NISL@THU
NISL@THU
C
Cisco Blogs
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Google DeepMind News
Google DeepMind News
Project Zero
Project Zero
IT之家
IT之家
T
Threatpost
Cyberwarzone
Cyberwarzone
O
OpenAI News
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
J
Java Code Geeks
P
Proofpoint News Feed
The Last Watchdog
The Last Watchdog
月光博客
月光博客
Latest news
Latest news
MongoDB | Blog
MongoDB | Blog
Apple Machine Learning Research
Apple Machine Learning Research

博客园 - looping

小米公司招聘前端--待遇不错 插入排序 insertion_sort js实现 JSLint for EditPlus 检验js语法 ECMA-262-3 深入解析.第四章. 作用域链 Vim 简洁手册 在 JavaScript 中监听 IME 键盘输入事件 英文已如此搞笑,翻译却更加残暴 古文中惊艳的句子 Nicholas C. Zakas vs John Resig 一场关于YUI3/jQuery的精彩辩论 浅谈 Mousewheel 事件 css 圆角效果,2例 CSS HACK org.hibernate.TransientObjectException: object references an unsaved t... 获取文本中img路径(不是dom中的) [JavaScript]ECMA-262 深入解析 IIS 7.5 下PHP(FastCGI模式)配置手记 Remove duplicates from Array移除数组重复元素 js 翻转颜色 difference between echo and print in php
jquery 1.4 append 用法
looping · 2010-06-04 · via 博客园 - looping
.append( function(index, html) )

function(index, html)A function that returns an HTML string to insert at the end of each element in the set of matched elements. Receives the index position of the element in the set and the old HTML value of the element as arguments.

群里有人问,写个简单的demo

   1:  <script type="text/javascript">
   2:      $(function() {
   3:          $("li").append(function(index, html) {
   4:              if (index == 3) {
   5:                  html += "new append";
   6:              }
   7:              return html;
   8:          });
   9:      });
  10:  </script>
  11:   
  12:  <ul><li>111</li><li>22</li><li>33</li><li>44</li></ul>