window alert html code example Example 1: js alert alert("Hello! I am an alert box!!"); Example 2: how to make alert in javascript alert("Alert")