
8
views
views
An alert box is simply a dialog box that can be used in websites. It's a fun way to interact with the visitors on your website. In this article, you'll discover how to use JavaScript to create a basic alert box.
Open up the text editor that you use. On windows, notepad++ is recommended. Many free, open-source text editors exist such as Atom, and visual studio code.
Add your HTML. Before you can add JavaScript, you need the content of your webpage. In this example, we create a simple HTML document with head, title and body tags.
Inside the
tags, create a