NEWS: Total Picture Views: 151536 | Total Article Views: 161019 | Top 5 Most Popular Article: 1. Am I Stuck Algorithm with Becker Robot | 2. PickUpThings with Becker Robot | 3. How to read a JSON and work with it | 4. Encrypted Data GUI (Download .Zip) | 5. Create Wall and Things with Becker

Basic Javascript Console Javascript

Description:

In this example I will be showing how to Javascript work with different console.







Code:

<html>
    <head>
        <title>Javascript Example</title>
    </head>
    <body>
        <script type="text/javascript">
            function popup(){
                alert("This is a pop up!");
            }
    
            function consoleError(){
                console.error("Error");
            }
    
            function confirmConsole(){
                confirm("Are you sure you want to do that?");
            }
    
            function promptConsole(){
                x = prompt("Enter something");
                alert("You entered: " + x);
            }
        </script>
        <button onclick="popup()">Popup Example</button><br><br>
        <button onclick="consoleError()">Console Error Example (F12)</button><br><br>
        <button onclick="confirmConsole()">Confirm Example</button><br><br>
        <button onclick="promptConsole()">Prompt Example</button>
    </body>
</html>
Attachments: None

Tags: Basic Console Confirm Prompt

Total Views: 825

My name is Jean-Mathieu

I created this website so other people could enjoy finding useful stuff easier. If you have any question do not hesitate to contact me.

jean8mathieuCreated on 12/15/14 and updated on 12/15/14


affiliate_link

Disclosure: We are a website that needs compensation to operate like any other website on the internet.
We may receive consideration for our reviews but we are totally unbiased and do not accept paid reviews or fake reviews claiming to be something they are not.