在ajax成功响应中获取html字符

时间:2013-04-30 07:24:36

标签: php jquery

我正在使用Ajax上传一个表单中的数据和文件作为帖子中给出的答案 Uploading both data and files in one form using Ajax?

我需要在警报中显示响应,如下所示

file uploaded successfully
Thanks for uploading

但我得到了回复file uploaded successfully<br/>Thanks for uploading 所以,任何人都可以告诉我如何获得没有任何HTML标签的响应..

1 个答案:

答案 0 :(得分:2)

$(data).text()用于剥离<br/>