【发布时间】:2015-01-28 14:22:06
【问题描述】:
我创建了一个搜索引擎,但遇到了问题。
<div class="singleresult" onclick="benger()">
<img class="profilepic" src="http://graph.facebook.com/'+this.id+'/picture" alt="Smiley face" height="50" width="50">
<p class="name">'+this.name+'</p>
<p class="tapto" algin="right">TAP TO UNLOCK</p>
</div>
如何通过点击div获取name值? 他们都有相同的类
【问题讨论】:
-
我尝试添加 onclick 但它不起作用 $(this) 选择器
-
分享你的实现代码
-
小提琴不工作
标签: javascript jquery html children attr