Highligh inserted section of the sample code
Output result as the body text instead of alert

Because alert() can be blocked by the web browser (ex. Firefox)
Remove description about "alert()"