Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在我的应用程序中,我有一个动态生成的表单。在单击按钮时,我必须使用 Ajax 将所有这些表单元素发送到另一个页面。由于表单是动态生成的,因此在调用 ajax 时我无法指定表单元素名称。
有没有办法在 Ajax 中不指定元素名称的情况下传递所有表单元素。可以作为元素数组。
$.post('ajaxurl', $('#form_id').serialize(), function(data) { // do something with data });