BOM的window对象的方法

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>window方法</title>
</head>
<body>
<script>
//1.alert
// alert('hello world')
//2.confirm
// confirm('can you save the file?')
// var con=confirm('can you save the file?');
// alert(con);//确定---true 取消----null
//3.prompt
// prompt('please input form');
var re=prompt('please input form');
alert(re);//取消----null,确定---输入什么返回什么
</script>

</body>
</html>

猜你喜欢

转载自www.cnblogs.com/startl/p/12244116.html