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.
我想在 asp.net updatepanel 更新时播放声音。ajax面板更新时是否有一种免费且简单的方式来播放声音?
您必须将事件附加到 endRequest 事件:
Sys.WebForms.PageRequestManager.getInstance().add_pageLoaded(EndRequestHandler);
以上是 Asp.Net ajax,您必须解析并确定回发是否来自更新面板的更新。让跨浏览器兼容的声音播放的唯一真正方法是在 Flash 对象中触发它。IE 和 FF 有不同的方法来发出声音。