i am haveing problem when im aleart
- 4 years ago
You have to write your javascript code within script tag
<!DOCTYPE html>
<html>
<body>
<p>Click the button to display an alert box.</p>
<button onclick="alertFunction()">Try it</button>
<script>
function alertFunction() {
alert("HELLO WORLD! I am an alert box Example!");
}
</script>
</body>
</html>
Hot Questions