Ajax成功的文本区域 [英] Text area on ajax success
本文介绍了Ajax成功的文本区域的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有这样的Java成功代码
I have a java success coded like this
success:function(response){
$("#responds").prepend(response);
$("#contentText").val(''); //empty text field on successful
}
如何在此处添加文本区域?
how can i add a textarea in here?
推荐答案
有两种方法可以做到这一点:
2 possibilities to do this:
首先:在发送回的响应中添加一个文本区域.
First: put a textarea in the response you're sending back.
第二:使用 $(#responds").prepend(< textarea>" +响应+</textarea>");
这篇关于Ajax成功的文本区域的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文