您的位置:首页 > Web前端 > JavaScript

JS:1.7,窗口(window)对象 window.close,window.open

2013-01-10 23:00 579 查看
ylbtech-window:窗口(window)对象之close,open
window的重要方法

window.close(),window.open()

网站刷点器

JS:1.7.1,window的重要方法 返回顶部
window.close();
window.open("url","_self|_blank","属性=值,....");
是否显示工具栏:toolbar[=yes|no]|[=1|0]
是否显示地址栏:location[=yes|no]|[=1|0]
是否显示前进、后退、刷新按钮:directories[=yes|no]|[=1|0]
是否显示状态栏:status[=yes|no]|[=1|0]
是否显示菜单栏:menubar[=yes|no]|[=1|0]
是否显示滚动条:scrollbars[=yes|no]|[=1|0]
用户是否可以改变窗口的大小:resizable[=yes|no]|[=1|0]
是否在新窗口中保留浏览器的浏览历史纪录:copyhistory[=yes|no]|[=1|0]
窗口的宽度 (单位为像素):width=pixels
窗口的高度 (单位为像素):height=pixels


JS:1.7.2,window.close(),window.open() 返回顶部
<html>
<head>
<title></title>
<script language="javascript">
function fun1()
{
//打开一个窗口
aa=window.open("14.html","","width=200,height=150,top=400,left=600");
}
function fun2()
{
//关闭一个窗口
aa.close();
}
</script>
</head>
<body>
<input type="button" id="j" name ="a" value="打开一个窗口" onClick="fun1()"></input>
<input type="button" id="j" name ="a" value="关闭窗口" onClick="fun2()"></input>
</body>
</html>


JS:1.7.3,网站刷点器返回顶部
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>袁博刷点 高效一流</title>
<script language="javascript">
var count=3;
var sumcount=100;//默认100次
var intervalid;
var url;
function funfirst()
{
intervalid=setInterval("fun1()",1000)
var txtsum=document.getElementById("txtcount").value;
if(txtsum.length!=0)
{
sumcount=parseInt(txtsum);
}
}
function fun1()
{
sumcount--;
var onclickurl=document.getElementById("txturl").value;
url=window.open("http://"+onclickurl,"_blank","");
if(sumcount<=1)
{
fun3();
}
fun2();
}
function fun2()
{
count--;
if(count<0)
{
url.close();
}
}
function fun3()
{
clearInterval(intervalid);
}
</script>
</head>
<body>
请在下输入你想要刷的网址(注:本产品仅支持在IE浏览器使用)
<table width="326" border="1">
<tr>
<td width="168"><input type="text" id="txturl"  /></td>
<td width="68"><input type="button" value="开始刷点" onclick="funfirst()"></td>
<td width="68"><input type="button" value="停止刷点" onclick="fun3()" /></td>
</tr>
<tr>
<td height="33">格式如:www.baidu.com</td>
<td>刷点次数</td>
<td><input type="text" id="txtcount"  width="20px" />
默认为100次</td>
</tr>
</table>
</body>
</html>



作者:ylbtech
出处:http://ylbtech.cnblogs.com/
本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐