javascrit

 

function wm(){     window.open("打开文件位置/打开文件")           .close();           .moveTo(10,0);           .resizeBy(10,5);/一依次调整当前窗口的尺寸/           .resizeTo();/移至/           alert("高"+window.screen.availHeight+"宽"+window.screen.availWidth );           alert(window.screen.height);           alert(window.screen.width);           alert(window.screen.pixelDepth);/屏幕色彩分辨率/           window可省略; } a.push();/在a中加入/ 显示宽高:var h=window.innerHeight;           var w=window.innerWidth;           alert(w+"@"+h); location获得当前页面的地址 functio ww(){   alert(window.location.hostname)   alert(window.location.pathname)/自己的路径和域名/   alert(window.location.port)/端口号/   alert(window.location.protocol)/协议/   alert(window.location.href)/网页获得整个的URL/ } function ww(){   location.assign("http//www.baidu.com");/加载页面/   location.assign("打开文件位置/打开文件");/加载页面/   alert(location.hash)/锚点/   location.replace("http//www.baidu.com")/替代/ } history function wm(){   window.history.back();/下一页/   window.history.forward();/上一页/   window.history.go(n);/表示n个下一页/正为下一页,负为n个上一页 } 获取浏览器信息 alert(window.navigator.appName); alert(window.navigator.appVersion); window.alert("弹框"); window.confirm("弹出");

window.setTimeout(函数名,时间)/只循环一次   window.setTime(function){      alert("时间") },时间);   window.setInterval(函数名,时间)/循环多次   clearLnterval/清除循环/ var a=window.setInterval(); clearLnterval(a);   docment.write(a)/在页面显示时间

posted @ 2014-10-22 19:33  浅微  阅读(798)  评论(0编辑  收藏  举报