例子:
<div>
<div class="lizi" onclick="dianji(data)">
<span>开始</span>
</div> //data为传的参数
<div class="lizi" onclick="dianji(data)">
<span>暂停</span>
</div>
<div class="lizi" onclick="dianji(data)">
<span>等一等</span>
</div>
<div class="lizi" onclick="dianji(data)">
<span>结束</span>
</div>
</div>
js:
dianji:function(data){
var event = window.event;
var found = event.currentTarget.children;
}
这时候可以输出found看一下是什么东西,然后进行下一步的操作