JQuery 獲得勾選行的特定屬性 組成的數(shù)組
const checkedBoxs = $("#visit-list table > tbody > tr > td:nth-child(1) > input[type='checkbox']:checked");
if (checkedBoxs.length > 0) {
const visitIdArr = $.makeArray(checkedBoxs).map(checkedBox => checkedBox.getAttribute("data-v"));
}
posted on 2017-02-23 16:25 sun_java_studio@yahoo.com.cn(電玩) 閱讀(87) 評論(0) 編輯 收藏