jQuery根据表单name获取值的方法

jQuery根据表单name获取值的方法

本文实例讲述了jQuery根据表单name获取值的方法。分享给大家供大家参考,具体如下:

根据name取值:

$(“input[name=mobile]”).val()

根据id取值:

$(“#mobile_reg_form”).html()

根据name取值遍历:

$(“input[name=mobile]”).each(
function(){
alert($(this).val());
}
)

取出form中的input:

© 版权声明

相关文章

暂无评论

none
暂无评论...