0

I'm working on a web application, which in some times JS messages and alerts popup, I want to 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.

4

1 回答 1

2

您实际上可以使用 javascript 中的自定义警报功能覆盖标准警报功能

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

有关更多详细信息,请参阅此

于 2010-01-19T12:13:22.047 回答