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 发布这些数据。
http://jsfiddle.net/dsDmc/59/
那是我的情况,但我不知道如何发送我的所有数据$.ajax()
$.ajax()
谢谢大家。
将其添加到表单中,然后发布包含所有输入的表单。
<form id="form"> <! -- Input Controls here -- > </form> $.ajax({ type: "POST", url: "yourURL", data: $("#form").serialize(), }).done(function( msg ) { alert( "Data Saved: " + msg ); });
也不要使用live,因为它已被弃用。首选方法是on。
live
on