나는 모든 ID를 얻을 수 tryng하고있어, '페이지 templete1'의 각 입력 요소의 값은 와 나는 성공하지 못했습니다JQuery와 : ID를 얻을 값 모든 입력 요소
function Temp1() {
var input = [];
$('page-templete1 input[name][id][value]').each(function(){
input.push(this);
cc=$(this).attr('id'));
alert(cc); // trying to get one at time (not working)});
alert(input[0].id); // not working
alert(input[0].attr('id')); // not working
});
alert(input[0].id); // not working
alert(input[0].attr('id')); // not working
}
페이지에서 모든 입력 요소의 값, ID 값을 얻고 나중에 액세스 할 수 있습니까? 참고 : 입력 요소의 ID 또는 개수를 알고 있습니다. 읽으려고 다음 var inputs = [];
과 :
$(function(){
$("input").each(function(){
alert($(this).attr('id'))
})
})
이 '[이름]을 제거하려고 ID 또는 클래스는 [ID] [값]'로부터에 있는지 여부를 지정해야 선택기 –