BOM的window对象的方法

Posted startl

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了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>

以上是关于BOM的window对象的方法的主要内容,如果未能解决你的问题,请参考以下文章

BOM的window对象的属性及其方法

JS BOM

JavaScript---Bom树的操作,内置方法和内置对象(window对象,location对象,navigator对象,history对象,screen对象)

BOM对象初识

Bom对象以及Dom对象

❤️前端BOM笔记-Window对象属性与方法(附带动图案例)