Use jquery to re-populate form with JSON data
问题 I have an HTML form, that I save to the database via ajax. To get the query string of key/value pairs, I have used the very convenient serialize function, like this: var myData = $("form#form_id").serialize(); $.ajax({ url: "my_save_script.php", type: "post", data: myData, success: function(msg){ alert(msg); } }); Now I want to load a blank form, and re-populate it with the data from the database, which is delivered from an ajax call as a JSON string. I have been able to get a Javascript