国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

javascript - Can I use js to cancel the alert window?
為情所困
為情所困 2017-06-12 09:20:43
0
2
946

Recently I wanted to operate the company's business system (web page) directly in emacs
So I used elisp to write a websocket server, and then I wrote a client in the business webpage using Grease Monkey Script. After connecting, I call a function in emacs to send instructions to the client. After receiving the instructions, the client executes the corresponding instructions. DOM operation, but after the operation is completed, the web page will pop up the alert window, and you must click OK.
Can I use js to control the alert? Let alert not be displayed or press Enter automatically after displaying?
thank you all

為情所困
為情所困

reply all(2)
小葫蘆

The

alert() function actually calls the window.alert() function, so it is very simple to stop it from being displayed. Just add a line directly to your script

window.alert=function(){}

That’s it.
Accident or not? Violent or not?

扔個(gè)三星炸死你

If the pop-up window pops up by the alert() method of native Javascript, it cannot be closed through JS code. It is recommended to use a custom pop-up window to implement the function, such as using x0popup to replace the pop-up window function. We hope to adopt it!

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template