תשובה אחת
alert ("text");
דוגמא מתוך קוד
<!doctype html>
<html>
<body>

<p>click the button to display an alert box.</p>

<button onclick="myfunction ()">try it</button>

<script>
function myfunction () (
alert ("hello! i am an alert box!");
)
</script>

</body>
</html>