在输入字段中显示ajax响应 [英] Display ajax response into input field
本文介绍了在输入字段中显示ajax响应的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有什么方法可以将ajax响应显示到输入字段中? 谢谢
is there any way to display ajax response into input field? thanks
推荐答案
是.
使用jQuery看起来像这样:
Using jQuery this looks like:
$.ajax({
url: '/test.php',
success: function(data) {
$('#your-input').val(data);
}
});
这篇关于在输入字段中显示ajax响应的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文