我在MDN上遵循了这个指南.
var formData = new FormData(); formData.append("username", "Groucho"); formData.append("accountnum", 123456); console.log(formData);
为什么formData
空?
他们是访问FormData的方法
var formData = new FormData(); formData.append("username", "Groucho"); formData.append("accountnum", 123456); console.log(formData.get("username")); console.log(formData.get("accountnum"));