问题描述
- jquery 获取同一class的div的所有ID值并取出最大值
-
<div id="SWFUpload_0_1" class="uploadify-queue-item"> <div id="SWFUpload_0_2" class="uploadify-queue-item"> <div id="SWFUpload_0_3" class="uploadify-queue-item"> <div id="SWFUpload_0_4" class="uploadify-queue-item">
div如上,求取出上面所有div 并取做大的'SWFUpload_0_4'
解决方案
var id=$('div.uploadify-queue-item:last').attr('id')
alert(id)
时间: 2024-10-26 00:18:09