循环输出<li>
<li>
<input type="radio" class="radio" name="shop_id" value="{$vo.id}">
<input type="hidden" class="title" name="title" value="{$vo.title}" />
<input type="hidden" class="price" name="price" value="{$vo.price}" />
</li>
<li>
<input type="radio" class="radio" name="shop_id" value="{$vo.id}">
<input type="hidden" class="title" name="title" value="{$vo.title}" />
<input type="hidden" class="price" name="price" value="{$vo.price}" />
</li>
.......以下是自己写的。$(function(){
$(".radio").each(function(){
$(this).click(function(){
var shop_id = $(this).val(); //现在只能获取id
........................
});
});
});现在要求点击.radio 获取 .ti最佳答案