1、学习地址:http://www.w3school.com.cn/jsref/met_win_alert.asp
2、alert() 方法用于显示带有一条指定消息和一个 OK 按钮的警告框。
<html>
<head>
<script type="text/javascript">
function disp_alert()
{
alert("再打个招呼。这里演示了" + "\n" + "如何在消息框中添加折行。")
}
</script>
</head>
<body>
<input type="button" οnclick="disp_alert()" value="显示消息框" />
</body>
</html>