jq,獲取表單數據,提交


1,所有表單html元素用form包裹。(第一次錯,沒有把提交按鈕放進form里面。)

<form action="" id="addTestForm" method="post" onsubmit="return false">。。。。。。。。。。。。。。。。。。</form>
2,序列化獲取表單數據
console.log($("form").serializeArray());
數組化收集表單數據
<input type="password11" name="password[]" class="form-control" id="exampleInputPassword111" placeholder="Password">


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM