Tôi đã dabbling với mẫu serialize nhưng đáng ngạc nhiên của nó không serializing các hình thức. Đây là mã:jQuery serialize không hoạt động
<div id="content">
</div>
<form id= "myform">
<input type="text" id="inp"value="mytext">
<input type="button" id="btn" value="serialize"/>
</form>
Đây là mã jQuery tôi đang làm việc với:
$("form").submit(function(e){
e.preventDefault();
var v= $(this).serialize();
console.log(v);
});
Đây là fiddle
ah! tôi chỉ cần một bộ mắt mới, tnx cho trả lời nhanh chóng – Tassadaque