显示“正在加载...”在下拉框中 [英] Show "Loading..." in dropdown box
本文介绍了显示“正在加载...”在下拉框中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在运行数据库查询以使用jquery加载下拉框。有没有办法在查询运行时在下拉框中显示正在加载...字样?
I'm running a database query to load a dropdownbox using jquery. Is there a way to display the words "Loading..." in the dropdownbox while the query is running?
谢谢。
推荐答案
您可以在ajax运行时将临时项添加到下拉列表中:
You can add temporary item to your dropdown list while the ajax is running:
$('#myDropDown').prepend($('<option></option>').html('Loading...'));
这篇关于显示“正在加载...”在下拉框中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文