以下のコードを使用しました jQuery("#change").submit(function() {
jQuery.each(jQuery('input[type=password]'),function(index,value){
//検証のためにパスワード入力フィールドの値を取得する必要があります
});
return false;
});
また、フォームで 3 つのパスワード入力フィールドを使用しました
jqueryの各関数内で値を取得する方法を教えてください。
以下のコードを使用しました jQuery("#change").submit(function() {
jQuery.each(jQuery('input[type=password]'),function(index,value){
//検証のためにパスワード入力フィールドの値を取得する必要があります
});
return false;
});
また、フォームで 3 つのパスワード入力フィールドを使用しました
jqueryの各関数内で値を取得する方法を教えてください。
$('input[type=password]').each(function(){
alert($(this).val());
});
$('input[type=password]').each(function(i,item){ alert( $(item).val() ) })
以下のようにコードを変更するだけです
$('input[type=password]').each(function(index,value)
{
// Here value(parameter) is an object
alert(value.value);
});