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
精彩评论