书签 分享 收藏 举报 版权申诉 / 11

类型js背景色安全测试.docx

  • 文档编号:29864472
  • 上传时间:2023-07-27
  • 格式:DOCX
  • 页数:11
  • 大小:16.01KB

--案例代码1结束-->

--案例代码2开始-->

vartemp1=newArray()

vartemp2=newArray()

if(document.layers){

for(i=1;i<=8;i++){

temp1[i]=eval("document.index"+i+".clip")

temp2[i]=eval("document.index"+i)

temp1[i].width=window.innerWidth/8-0.3

temp1[i].height=window.innerHeight

temp2[i].left=(i-1)*temp1[i].width}}

elseif(document.all){

varclipbottom=document.body.offsetHeight,cliptop=0

for(i=1;i<=8;i++){

temp1[i]=eval("document.all.index"+i+".style")

temp1[i].width=document.body.clientWidth/8

temp1[i].height=document.body.offsetHeight

temp1[i].left=(i-1)*parseInt(temp1[i].width)}}

functionShutterBackGround(){

--[Step3]:

这里可以更改显示百叶窗的速度-->

StopShutter=setInterval("OpenShutter()",100)

}

functionOpenShutter(){

window.scrollTo(0,0)

if(document.layers){

for(i=1;i<=8;i=i+2)temp1[i].bottom-=5

for(i=2;i<=8;i=i+2)temp1[i].top+=5

if(temp1[2].top>window.innerHeight)clearInterval(StopShutter)}

elseif(document.all){

clipbottom-=5

for(i=1;i<=8;i=i+2){temp1[i].clip="rect(0auto+"+clipbottom+"0)"}

cliptop+=5

for(i=2;i<=8;i=i+2){temp1[i].clip="rect("+cliptop+"autoauto)"}

if(clipbottom<=0)clearInterval(StopShutter)}

}

ShutterBackGround()

--案例代码2结束-->

4用户选择背景色

页面背景篇--用户选择背景色



页面背景篇--用户选择背景色



--案例代码1开始-->

functionUserBGColor(form){

document.bgColor=(""+form.text.value+"");

}

--案例代码1结束-->

--案例代码2开始-->

--[Step1]:

这里可以更改页面显示的提示信息-->

输入背景颜色代码:


--[Step2]:

在此能够设置文本框的列长度-->

--[Step3]:

这里可以修改按钮的名称-->

--案例代码2结束-->

5背景色安全测试

页面背景篇--背景色安全测试



页面背景篇--背景色安全测试


--案例代码1开始-->

functionBGColorArray(q){

for(i=1;i<=q;i++){this[i]=0}

}

Colors=newBGColorArray(7);

--[Step1]:

这里可以按序增加颜色集合-->

Colors[1]="00";

Colors[2]="33";

Colors[3]="66";

Colors[4]="99";

Colors[5]="AA";

Colors[6]="FF";

--案例代码1结束-->

--案例代码2开始-->

for(i=1;i<=2;i++){

for(j=5;j<=6;j++){

for(k=3;k<=4;k++){

varthiscolor=Colors[i]+Colors[j]+Colors[k];

--[Step2]:

这里可以更改测试纸的高度-->

document.writeln("

document.writeln("\'\'onMouseOver=\"document.bgColor=\'"+thiscolor+"\'\">"+thiscolor+"");}}}

--案例代码2结束-->

6背景图形居中

页面背景篇--背景图形居中



页面背景篇--背景图形居中



--案例代码开始-->

--[Step1]:

这里可以设置居中的背景图形名称-->

body{background-image:

url('Picture003.gif');

background-position:

center50%;

background-repeat:

no-repeat;

background-attachment:

fixed}

--案例代码结束-->

7变色文本特效

页面背景篇--背景图形居中



页面背景篇--背景图形居中



--案例代码开始-->

--[Step1]:

这里可以设置居中的背景图形名称-->

body{background-image:

url('Picture003.gif');

background-position:

center50%;

background-repeat:

no-repeat;

background-attachment:

fixed}

--案例代码结束-->

8按钮显示背景色

页面背景篇--按钮显示背景色



页面背景篇--按钮显示背景色



--案例代码1开始-->

functionButtonColor(bgc){

document.bgColor=bgc

}

--案例代码1结束-->

--案例代码2开始-->

--[Step1]:

在此能够更改按钮的名称-->

--[Step2]:

这里可以设置按钮对应的背景颜色-->

--案例代码2结束-->

配套讲稿:

如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。

特殊限制:

部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。

关 键  词:
js 景色 安全 测试
提示  冰豆网所有资源均是用户自行上传分享,仅供网友学习交流,未经上传用户书面授权,请勿作他用。
关于本文
本文标题:js背景色安全测试.docx
链接地址:https://www.bdocx.com/doc/29864472.html

copyright@ 2008-2022 冰点文档网站版权所有

经营许可证编号:鄂ICP备2022015515号-1