查看完整版本: 四邊開啟視窗

27-5-2013 06:45

四邊開啟視窗

[color=purple]#FFCCFF   <<< 視窗開啟時背景顏色,可更改[/color]
[color=purple][/color]
[color=purple]var speed=10 <<< 10是開啟時速度,越大越快,可更改[/color]
[color=purple][/color]
[color=purple][/color]
[color=purple][size=3][color=#0000ff]如不能顯示語法效果可貼去本站[/color][/size][url=http://www.bunbun000.com/html/index.htm][size=3][color=red]語法測試板[/color][/size][/url][size=3][color=#0000ff]試看[/color][/size][/color]
[color=#0000ff][/color]
[color=blue][/color]
[color=blue][/color]
[color=blue]<style>
<!--
.intro{
position:absolute;
left:0;
top:0;
}
-->
</style>
<div id="i1" class="intro" style="background-color: #FFCCFF"></div>
<script language="JavaScript">
<!--
var speed=10
if (document.layers){
var reference=window.innerWidth/window.innerHeight
var temp=eval("document.i1.clip")
temp.left=temp.top=0
temp.right=window.innerWidth
temp.bottom=window.innerHeight
}
else if (document.all){
var reference=document.body.clientWidth/document.body.clientHeight
var rightclip,leftclip,topclip,bottomclip
var temp=document.all.i1.style
topclip=leftclip=0
rightclip=temp.width=document.body.clientWidth
bottomclip=temp.height=document.body.clientHeight
}
function doit(){
window.scrollTo(0,0)
if (document.layers){
if (temp.left>window.innerWidth/2)
clearInterval(stopit)
temp.left+=reference*speed
temp.top+=speed
temp.right-=reference*speed
temp.bottom-=speed
}
else if (document.all){
if (leftclip>document.body.clientWidth/2)
clearInterval(stopit)
temp.clip="rect( "+topclip+" "+rightclip+" "+bottomclip+" "+leftclip+")"
leftclip+=reference*speed
topclip+=speed
rightclip-=reference*speed
bottomclip-=speed
}
}
stopit=setInterval("doit()",100)
-->
</script>[/color]

27-5-2013 06:48

複製上列語法

<form name="copy">
<textarea cols="40" name="txt" rows="4" style="BACKGROUND-COLOR:#ffffff; COLOR:#000000; FONT-SIZE:9pt">
<style>
<!--
.intro{
position:absolute;
left:0;
top:0;
}
-->
</style>
<div id="i1" class="intro" style="background-color: #FFCCFF"></div>
<script language="JavaScript">
<!--
var speed=10
if (document.layers){
var reference=window.innerWidth/window.innerHeight
var temp=eval("document.i1.clip")
temp.left=temp.top=0
temp.right=window.innerWidth
temp.bottom=window.innerHeight
}
else if (document.all){
var reference=document.body.clientWidth/document.body.clientHeight
var rightclip,leftclip,topclip,bottomclip
var temp=document.all.i1.style
topclip=leftclip=0
rightclip=temp.width=document.body.clientWidth
bottomclip=temp.height=document.body.clientHeight
}
function doit(){
window.scrollTo(0,0)
if (document.layers){
if (temp.left>window.innerWidth/2)
clearInterval(stopit)
temp.left+=reference*speed
temp.top+=speed
temp.right-=reference*speed
temp.bottom-=speed
}
else if (document.all){
if (leftclip>document.body.clientWidth/2)
clearInterval(stopit)
temp.clip="rect( "+topclip+" "+rightclip+" "+bottomclip+" "+leftclip+")"
leftclip+=reference*speed
topclip+=speed
rightclip-=reference*speed
bottomclip-=speed
}
}
stopit=setInterval("doit()",100)
-->
</script>
</textarea><br>
<input onclick="javascript:this.form.txt.focus();this.form.txt.select();" type="button" value="全選">
</form>

<br>

<script type="text/javascript"><!--
google_ad_client = "ca-pub-4078143172638881";
/* 336X280 */
google_ad_slot = "3268225205";
google_ad_width = 336;
google_ad_height = 280;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
頁: [1]
查看完整版本: 四邊開啟視窗