Window alert() 方法

一 定义和用法
alert()方法用于显示带有一条指定消息和一个确认按钮的警告框。
 
二 语法
alert(message)
 
三 代码
<html>
<head>
<title>警告对话框的应用</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body onLoad="al()">
<script language="javascript">
function al(){
 window.alert("弹出警告对话框!");
}
</script>
</body>
</html>
 
四 运行结果

 

猜你喜欢

转载自cakin24.iteye.com/blog/2355984