Alert on button click using javascript

<!DOCTYPE html>
<html>
<body>

<p>Click the button to display an alert box:</p>

<button onclick="myFunction()">Try it</button>

<script>
function myFunction() {
    alert("I am an alert box!");
}
</script>

</body>
</html>

Comments

Popular posts from this blog

Real-Time Web Interface to MQTT using Socket.io and Node.js

Insert session variable into MySQL database

Insert CheckBox and Radio button Data in MySQL Database Using PHP