How to do alert in Webpage Using JavaScript

Using javascript doing alert webpage



<html>
<head>
<script>
function myFunction() {
    alert("Hello\nHow are you?");
}
</script>
</head>
<body>

<p>Click the button to demonstrate line-breaks in a popup box.</p>

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








Comments