• 软件测试技术
  • 软件测试博客
  • 软件测试视频
  • 开源软件测试技术
  • 软件测试论坛
  • 软件测试沙龙
  • 软件测试资料下载
  • 软件测试杂志
  • 软件测试人才招聘
    暂时没有公告

字号: 小 中 大 | 推荐给好友 上一篇 | 下一篇

动态伸缩ie窗口(酷)(天乐原创)

发布: 2007-6-30 18:56 | 作者: admin | 来源: | 查看: 23次 | 进入软件测试论坛讨论

领测软件测试网
动态伸缩ie窗口(酷)
【天乐先生】 于 2001-11-15 9:24:05 加贴在 Asp开发
    <html>
    <head>
    <title>topdigi</title>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <style type="text/css">
    <!--
    .p,div {font-size:9pt; line-height:14pt; font-family:宋体;}
    .p1{font-size:9pt;font-family:宋体;}
    .p2{font-size:9pt;font-family:宋体;line-height:14pt;}
    .p3{font-size:14.8px;font-family:宋体;}
    .p4{font-size:14.8px;font-family:宋体;line-height:14pt;}
    .p5{font-size:10pt}
    。body{font-size:9pt;font-family:宋体;}
    A {text-decoration: none}
    A:visited {text-decoration: none}
    A:active {text-decoration: none; color: #CC0000}
    A:hover {text-decoration: underline; color: #FF0000}   
    .bor {  border: #000000; border-style: solid; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px}
    .p6 {  font-size: 9pt; text-decoration: line-through; color: #FF3300}
    .textfield {  background-color: #AAD5FF}
    .text {  font-size: 12px; color: #FFFFFF}
    .black {  color: #000000}
    -->
    </style>

    </head>

    <body bgcolor="#FFFFFF" topmargin="0" leftmargin="0" >
    <script language="javascript" type="text/javascript">
    <!--
    var winheight=100
    var winwidth=100
    var cat=null

    step=1;

    function catswindows(name,width,height,title)
    {

    if (!document.all)
    {
      if (!document.layers)
       {
        paramstp="height="+height+",width="+width+",top=10"+
        ",left=10,scrollbars=no,location=no"+
        ",directories=no,status=yes,menubar=no,toolbar=no,resizable=no"
        cat=window.open("","cat",paramstp);
        oldstr="<html><title>"+title+"</title><body background="+name+">"+"</b"+"ody></h"+"tml>";
        cat.document.write(oldstr);
        if (cat.focus){cat.focus();}
        return;
        }
       else
       {
        LeftPosition=(screen.width)?(screen.width-width)/2:100;
        TopPosition=(screen.height)?(screen.height-height)/2:100;
        paramstp="height="+height+",width="+width+",top="+TopPosition+
        ",left="+LeftPosition+",scrollbars=no,location=no"+
        ",directories=no,status=no,menubar=no,toolbar=no,resizable=no"
        cat=window.open("","cat",paramstp);
        loadpos=height/2-40
        string="<html><title>"+title+"</title><body bgcolor=black><div id=loadintxt style=@#position:absolute;top:"+loadpos+"px@#></div>"
        string1=@#<s@#+@#cript>var animColorIndex=0;colorArray=["#FFFFFF","#CCCCCC","#999999","#666666","#333333","#000000","#333333","#666666","#999999","#CCCCCC"];@#
        string2=@#function textLooping(){if(animColorIndex==10)animColorIndex=0;document.loadintxt.document.open();@#
        string3=@#document.loadintxt.document.write("<center><font size=4 face=Comic Sans MS color="+colorArray[animColorIndex]+"><b>Loading...</b></font></center>");document.loadintxt.document.close();@#
        string4=@#animColorIndex++;};animInterval=setInterval("textLooping()",200);</s@#+@#cript>@#
        string5=@#<s@#+@#cript language="jav@#+@#ascript1.2">@#
        string6="function init(){document.catpic.visibility=@#show@#;clearInterval(animInterval);document.loadintxt.visibility=@#hide@#;};"
        string7="</s"+"cript>"
        string8="<div id=catpic style=@#position:absolute;left:0px;top:0px;visibility:hidden@#>"
        string9="<img src=@#"+name+"@# width="+width+" height="+height+" border=0 onload=@#init()@#></div></b"+"ody></h"+"tml>";
        cat.document.writeln(string);
        cat.document.writeln(string1);
        cat.document.writeln(string2);
        cat.document.writeln(string3);
        cat.document.writeln(string4);
        cat.document.writeln(string5);
        cat.document.writeln(string6);
        cat.document.writeln(string7);
        cat.document.writeln(string8);
        cat.document.writeln(string9);
        if(cat.focus){cat.focus();}
        return;
       }
    }
      LeftPosition=(screen.width)?(screen.width-width)/2:100;
      TopPosition=(screen.height)?(screen.height-height)/2:100;
      paramstp="height="+winheight+",width="+winwidth+",top="+TopPosition+
      ",left="+LeftPosition+",scrollbars=no,location=no"+
      ",directories=no,status=no,menubar=no,toolbar=no,resizable=no"
      cat=window.open("","cat",paramstp);
      string="<html><title>"+title+"</title><body topmargin=0 leftmargin=0 bgcolor=black>"
      string1="<div id=loadintxt style=@#position:absolute;width:100%;top:45%;text-align:center;visibility:visible;font-family:Comic Sans MS;font-size:16px;font-weight:bold@#>Loading...</div>"
      string2="<div id=errtxt style=@#position:absolute;width:100%;top:45%;text-align:center;visibility:visible;font-family:Comic Sans MS;font-size:16px;color:red;font-weight:bold;visibility:hidden@#>ERROR!!! Please try again</div>"
      string3=@#<s@#+@#cript>@#+@#var animColorIndex=0;@#+
      @#colorArray=["#FFFFFF","#CCCCCC","#999999","#666666","#333333","#000000","#333333","#666666","#999999","#CCCCCC"];@#+
      @#function textLooping(){if(animColorIndex==10)animColorIndex=0;@#+
      @#loadintxt.style.color=colorArray[animColorIndex];@#+
      @#animColorIndex++;}animInterval=setInterval("textLooping()",200);@#
      string4=@#function erroccur(){clearInterval(animInterval);@#+
      "loadintxt.style.visibility=@#hidden@#;"+
      "errtxt.style.visibility=@#visible@#;}"+@#</s@#+@#cript>@#
      string5=@#<s@#+@#cript language="jav@#+@#ascript1.2">@#+
      @#function init(){clearInterval(animInterval);@#+
      "loadintxt.style.visibility=@#hidden@#;"+
      @#fltr.filters.item(0).Apply();fltr.filters.item(0).Play();@#+
      @#fltr.style.visibility="visible";}@#+@#</s@#+@#cript>@#;
      string6=@#<img id="fltr" style="filter:BlendTrans(Duration=5);visibility:hidden" src="@#+name+@#" border=0@#+
      @# width=@#+width+@# height=@#+height+@# onload="init()" onerror="erroccur()">@#+
      @#</b@#+@#ody></h@#+@#tml>@#;
      cat.document.writeln(string);
      cat.document.writeln(string1);
      cat.document.writeln(string2);
      cat.document.writeln(string3);
      cat.document.writeln(string4);
      cat.document.writeln(string5);
      cat.document.writeln(string6);

      x = y = step
      while (x | y)
      {
        cat.resizeBy (x, y)
        if (cat.document.body.clientWidth >= width) x = 0
        if (cat.document.body.clientHeight >= height) y = 0
      }
    if(cat.focus){cat.focus();}
    }

    function CloseCatWin()
    {if(cat!=null && cat.open)cat.close()}

    window.onfocus=CloseCatWin;

    //-->
    </script>

    <p> </p>
    <p> </p>
    <p align="center">

    <a href="" onClick="catswindows(@#http://www.chineseea.com/images/product/tn_002200920002.JPG@#,@#400@#,@#400@#,@#show product@#); return false" onFocus="this.blur()">放大图片</a>
    </p>
    </body>
    </html>

延伸阅读

文章来源于领测软件测试网 https://www.ltesting.net/


关于领测软件测试网 | 领测软件测试网合作伙伴 | 广告服务 | 投稿指南 | 联系我们 | 网站地图 | 友情链接
版权所有(C) 2003-2010 TestAge(领测软件测试网)|领测国际科技(北京)有限公司|软件测试工程师培训网 All Rights Reserved
北京市海淀区中关村南大街9号北京理工科技大厦1402室 京ICP备10010545号-5
技术支持和业务联系:[email protected] 电话:010-51297073

软件测试 | 领测国际 | ISTQB | ISTQB官网 | TMMi | TMMi认证 | 国际软件测试工程师认证 | 领测软件测试网