我正在使用jQuery。如何有效提取列表數據?在jQuery中提取列表數據
列表有:
<li class="add"><a href="#">Data1</a></li>
<li class="add"><a href="#">Data2</a> </li>
...
我的jQuery有:
$(".add").click(function(e){
e.preventDefault();
// Here is to get the value of Data1 and Data2...
// How do I alert Data1, Data2 effectively?
});