我正在使用下面的代码,但是当我使用下面的代码试图将 html 片段发送到处理页面以将其保存为文件时,我什么也没得到。
我尝试使用 ajax 并将 processData 设置为 html、text 和 xml 的虚假广告数据类型,但没有任何效果。我在这方面找不到任何东西,所以我想我一定错过了一些相当微不足道的东西,但我已经做了 3 个小时了。
This works
$.post("SaveFile.aspx", {f: "test4.htm", c: "This is a test"},
function(data){
alert(data);
}, "text");
This fails
$.post("SaveFile.aspx", {f: "test4.htm", c: "<h1>This is a test</h1>"},
function(data){
alert(data);
}, "text");