1 <!DOCTYPE html> 2 <html> 3 <head> 4 <meta charset="UTF-8"> 5 <title></title> 6 </head> 7 <body> 8 //window.alert(location);//当前网页的地址 9 //location = 'http://www.baidu.com';//跳转到网址 10 //location.href = 'http://www.163.com'; 11 //document.onclick=function(){ 12 //location.reload()//刷新 13 //location.reload(true)//刷新 无缓存 14 //alert(location.toSource());//获取某个对象的源码 15 //} 16 17 //alert(navigator.appName);//浏览器名称 18 //alert(navigator.appVersion);//浏览器版本 19 //alert(navigator.platform);//操作系统 20 //alert(navigator.userAgent);//代理 21 22 //document.onclick=function(){ 23 //close();//关闭网页 24 //} 25 26 //status = '状态栏信息'; 27 //defaultStatus = '当status无效时,状态栏缺省信息'; 28 29 //document.onclick=function(){ 30 //blur();//失去焦点 31 //} 32 33 //alert(''); 34 //alert(confirm('内容'));//弹出一个有确认和取消/关闭的对话框。返回值:确认true,取消/关闭false 35 //var s = prompt('提示', '内容');//弹出一个输入框;返回值:确认时返回内容,取消/关闭时返回null 36 //alert(s); 37 //b=false 38 //while(b==false){ 39 // b=confirm('魔镜魔镜,你确定我是世界上最帅的人吗?') 40 //} 41 42 //setTimeout(function(){alert('')}, 3000) 43 44 //function fn(){ 45 // alert(''); 46 // setTimeout('fn()', 3000); 47 //} 48 </body> 49 </html>