how to get the window alert attributes in JS code example Example 1: simple alert program in javascript alert("this is the alert") Example 2: javascript alert alert("string");