When we browse the web, we may encounter that a certain web page cannot be accessed or is unsafe to access. At this time, a warning dialog box will pop up. So, what can we do with this pop-up dialog box? What about implementation? This article will introduce to you how to use How to use How to use JavaScript to implement pop-up warnings to implement pop-up warnings to implement this pop-up warning. Let’s look at the specific content below.
It is very simple to implement this kind of pop-up warning using How to use How to use JavaScript to implement pop-up warnings to implement pop-up warnings. Let’s take a look at the specific example
To use How to use How to use JavaScript to implement pop-up warnings to implement pop-up warnings to display the alert , just write the following code
alert('要显示的字符串,值');
The complete code is as follows
<!DOCTYPE html> <html lang = "ja"> <head> <meta charset = "utf-8"> <title>How to use How to use JavaScript to implement pop-up warnings to implement pop-up warnings</title> </head> <body> <script> alert('警告!!!'); </script> </body> </html>
The running effect is as follows: When using the browser to load the file, nothing will be displayed on the browser, but the following will be displayed on the page pop up
The above is the detailed content of How to use JavaScript to implement pop-up warnings. For more information, please follow other related articles on the PHP Chinese website!