Java Script

Java Script



Click the button to display a confirm box.

This is a simple JavaScript that tells you what button you pressed.

function myFunction() {
    var x;
    if (confirm("Press a button!") == true) {
        x = "You pressed OK!";
    } else {
        x = "You pressed Cancel!";
    }
    document.getElementById("result").innerHTML = x;
}

But it is not the only script that is used on this page. You can also see the "mouseover" event script. Just put our mouse over word "Script"

And if you look closely, you can find one more hidden script.