JS窗口最大化(模拟最大化和点击最大化按钮效果)

<html>
	<head>
		<title>test</title>
		<script type="text/javascript">
		/*
		function isMobile(val){
			//兼容格式: 国家代码(2到3位)-区号(2到3位)-电话号码(7到8位)-分机号(3位)
			var telReg = /^(([0\+]\d{2,3}-)?(0\d{2,3})-)(\d{7,8})(-(\d{3,}))?$/;
			//验证手机号
			var mobileReg = /^((\(\d{3}\))|(\d{3}\-))?13\d{9}|15[0-9]\d{8}$/;
			if(mobileReg.test(val) || telReg.test(val))
				return true;
			return false;
		}
		
		var testStr = "0712-aa";
		alert(isMobile(testStr));
		*/
		
		/*
		function testMax(){
			//var width = document.body.clientWidth;
			//var height = document.body.clientHeight;
			//var width = window.screen.width;
			//var height = window.screen.height;
			//document.getElementById("test").style.backgroundColor = "#000000";
			//document.getElementById("test").style.width = width+"px";
			//document.getElementById("test").style.height = height+"px";
			//window.resizeTo(screen.availWidth,screen.availHeight)
			//window.resizeTo(width, height);
		}
		*/
		</script>
	</head>
	
	<body id="test" οnlοad="max.Click();">
		<object id="min" type="application/x-oleobject" classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11">
			<param name="Command" value="Minimize">
		</object>
		<object id="max" type="application/x-oleobject" classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11"> 
			<param name="Command" value="Maximize">
		</object>   
	<body>
</html>

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值