开发者

In a web application can I suppress a JS message which popup in client side browser?

开发者 https://www.devze.com 2022-12-17 00:40 出处:网络
I\'m working on a web application, which in some times JS messages and alerts popup, I want 开发者_如何学JAVAto suppress this messages and alerts from poping up, How can I do that if I don\'t know whe

I'm working on a web application, which in some times JS messages and alerts popup, I want 开发者_如何学JAVAto suppress this messages and alerts from poping up, How can I do that if I don't know when or where this message pop up from using c# code?!

in other words, how I can take control on the IE window(client side) in which this message popup and how to simulate a click event on the "OK" button in that message.

Hope you got it !

please help me because I'm runnig out of time.


You can actually overide the standard alert function with a custom one in javascript

window.alert = function(message) {
   // process or swallow the message
}

See this for more details

0

精彩评论

暂无评论...
验证码 换一张
取 消