Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想在使用某些加载图像执行 ajax 调用时替换下拉列表(具有导致 ajax 更新的更改事件)控件。一旦 ajax 调用结束,我想在所有事件处理程序完好无损的情况下恢复该下拉列表。任何简单的示例或指针将不胜感激。谢谢
使用 jQuery:
savedEl = $('#yourSelectBox'); savedEl.hide().after('<img src="loading.gif" />');
当ajax完成时:
savedEl.show().next().remove();