js在本页打开另一窗体变大至充满整个网页时打开另一个页面(淘宝)

来源:互联网 发布:洛阳青峰网络黄伟 编辑:程序博客网 时间:2024/04/30 03:58

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="zuoye33.aspx.cs" Inherits="zuoye33" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"><head runat="server">    <title></title> <script type="text/javascript">     var wheight = 100;     var wwidth = 100;     var num = 5;     function openwindow(newpage) {         tzpage = newpage;         windowlocation = window.open("", "", "scrollbar");//scrollbar是有没有滚动条         windowlocation.moveTo(0, 0);         windowlocation.resizeTo(300, 300);         changewindow();     }     function changewindow() {         if (wheight >= screen.availHeight-3) //高度超过窗体最大高度时             num = 0;         windowlocation.resizeBy(5, num);         wheight += 5;         wwidth += 5;         if (wwidth >= screen.width - 5) { //宽度超过窗体最大宽度时             windowlocation.location = tzpage;             return         }         setTimeout(changewindow, 50);     } </script></head><body>    <form id="form1" runat="server">    <div>    <a href="javascript:openwindow('http://www.taobao.com')" >Click me淘你喜欢</a>    </div>    </form></body></html>

原创粉丝点击