asp.net ajax updatepanel 和播放声音
我想在 asp.net updatepanel 更新时播放声音。 ajax面板更新时有没有免费且简单的方法来播放声音?
I want to play a sound when asp.net updatepanel updates. Is there a free and simple way to play sound when ajax panel updates?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您必须将一个事件附加到 endRequest 事件:
上面是 Asp.Net ajax,您必须解析并确定回发是否来自 updatepanel 的更新。 获得跨浏览器兼容的声音播放的唯一真正方法是在 Flash 对象内触发它。 IE 和 FF 有不同的发出声音的方法。
Your going to have to attach an event to the endRequest event:
the above is Asp.Net ajax, you will have to parse and determine if the postback is coming from a updatepanel's update. The only true way to get a sound to play that is cross browser compatible is to trigger it within a Flash object. IE and FF have different methods for firing a sound.