'page-templete1'の各入力要素のすべての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またはその数はわかっています。同様の問題について話している古い投稿がありますが、私の問題は解決しませんでした