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

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

放大镜

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

领测软件测试网 <!--- THE SITE IS DESIGNED BY MYHYLI --->  
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">

<script language="JavaScript">
<!--
var zoomvalue=3;
var magnifierw0=100;
var magnifierh0=50;

function init() {
document.body.innerHTML+=@#<div id="magnifier" style="background-image:url(images/spacer.gif);position:absolute; width:100px; height:50px; z-index:100; left: 0px; top: 0px;border:1px solid #FF0000;visibility:hidden;text-align:right;font-size:10px;font-family:Verdana;color:#FF0000;cursor:default;overflow:hidden" onclick="showhide()" onselectstart="return false;">300%</div><div id="zoom" style="background-color:red;position:absolute; width:300px; height:150px; z-index:100; left: 0px; top: 0px;border:1px solid #CCCCCC;visibility:hidden"><iframe name="zoomiframe" src="about:blank" frameborder="0" scrolling="no" width="100%" height="100%"></iframe></div>@#;
}

function setposition() {
zoom.style.left=document.body.clientWidth+document.body.scrollLeft-5-zoom.offsetWidth;
zoom.style.top=document.body.scrollTop+5;
}

function showhide() {
if (magnifier.style.visibility==@#hidden@#) {
    magnifier.style.left=document.body.scrollLeft+event.clientX-magnifier.offsetWidth/2;
    magnifier.style.top=document.body.scrollTop+event.clientY-magnifier.offsetHeight/2;
    magnifier.style.visibility=@#visible@#;
    zoom.style.visibility=@#visible@#;
    zoomiframe.location.href=self.location;
    setposition();
    magnifier.setCapture();
    }
else {
    if (event.shiftKey) {
        if (zoomvalue<1) {zoomvalue+=0.1;}
        else {zoomvalue=zoomvalue+1>8?8:zoomvalue+1;}
        magnifier.style.width=3*magnifierw0/zoomvalue;
        magnifier.style.height=3*magnifierh0/zoomvalue;
        magnifier.innerText=parseInt(zoomvalue*100)+@#%@#;
        }
    else if (event.ctrlKey) {
        if (zoomvalue-1>0) zoomvalue-=1;
        else {if (parseInt(zoomvalue*10)/10>0.5) zoomvalue-=0.1;}
        magnifier.style.width=3*magnifierw0/zoomvalue;
        magnifier.style.height=3*magnifierh0/zoomvalue;
        magnifier.innerText=parseInt(zoomvalue*100)+@#%@#;
        }
    else {
        magnifier.style.visibility=@#hidden@#;
        zoom.style.visibility=@#hidden@#;
        zoom.style.left=0;
        magnifier.releaseCapture();
        }

    }
follow();
}

function follow() {
if (magnifier.style.visibility==@#visible@#) {
    magnifier.style.left=document.body.scrollLeft+event.clientX-magnifier.offsetWidth/2;
    magnifier.style.top=document.body.scrollTop+event.clientY-magnifier.offsetHeight/2;
    zoomiframe.scrollTo(magnifier.offsetLeft,magnifier.offsetTop);
    zoomiframe.document.body.style.zoom=zoomvalue;
    zoomiframe.document.body.style.border=@#@#;
    }
}

document.onmousemove=follow;
document.onselectstart=new Function(@#return false;@#);
document.ondblclick=showhide;
window.onresize=setposition;
window.onload=init;
// -->
</script>
<link rel="stylesheet" href="images/test.css" type="text/css">
</head>

<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0">
<table width=500 border=0 cellspacing=0 cellpadding=0>
<tr>
<td>
<p>双击页面出预览窗口及表示预览区域大小的方框,单击关闭</p>
<p>在方框内,同时按下shift和鼠标左键,将增加放大比例;</p>
<p>在方框内,同时按下ctrl和鼠标左键,将增加减小比例;</p>
<p>你也可以试着将head区里的script单独存成js文件,放到你的页面里看看</p>
<p>不过使用时有一些限制,例如页面表格不能用100%,必须是象素值,而且不能使用居中或者居右对齐方式</p>
<p>双击页面出预览窗口及表示预览区域大小的方框,单击关闭</p>
<p>在方框内,同时按下shift和鼠标左键,将增加放大比例;</p>
<p>在方框内,同时按下ctrl和鼠标左键,将增加减小比例;</p>
<p>你也可以试着将head区里的script单独存成js文件,放到你的页面里看看</p>
<p>不过使用时有一些限制,例如页面表格不能用100%,必须是象素值,而且不能使用居中或者居右对齐方式</p>
<p>双击页面出预览窗口及表示预览区域大小的方框,单击关闭</p>
<p>在方框内,同时按下shift和鼠标左键,将增加放大比例;</p>
<p>在方框内,同时按下ctrl和鼠标左键,将增加减小比例;</p>
<p>你也可以试着将head区里的script单独存成js文件,放到你的页面里看看</p>
<p>不过使用时有一些限制,例如页面表格不能用100%,必须是象素值,而且不能使用居中或者居右对齐方式</p>
<p>双击页面出预览窗口及表示预览区域大小的方框,单击关闭</p>
<p>在方框内,同时按下shift和鼠标左键,将增加放大比例;</p>
<p>在方框内,同时按下ctrl和鼠标左键,将增加减小比例;</p>
<p>你也可以试着将head区里的script单独存成js文件,放到你的页面里看看</p>
<p>不过使用时有一些限制,例如页面表格不能用100%,必须是象素值,而且不能使用居中或者居右对齐方式</p>
</td>
</tr>
</table>
</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认证 | 国际软件测试工程师认证 | 领测软件测试网