您的位置:网大 >> 网络 >> 网页特效 >> 正文

下落的窗口

作者:不详时间:2006-1-10 16:08:07

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

  • Talk To Other Members
  • Notification Of Responses To Questions
  • Favorite Forums One Click Access
  • Keyword Search Of All Posts, And More...

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

源代码如下:

<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="Keywords" content="51windows.Net">
<meta name="Author" content="haiwa">
<title>下落的窗口-www.51windows.Net</title>
<style>
<!--
*         {font:menu}
-->
</style>
</head>

<body onload=doPopup()>
<script language="JavaScript">
<!--

// Drop-in content box- By Dynamic Drive
// For full source code and more DHTML scripts, visit http://www.dynamicdrive.com
// This credit MUST stay intact for use

var ie=document.all
var dom=document.getElementById
var ns4=document.layers

var bouncelimit=32 //(must be divisible by 8)
var direction="left"

function initbox(){
if (!dom&&!ie&&!ns4)
return
cen=(ie)? document.body.clientWidth/2-155 : (dom)?window.innerWidth/2-155  : window.innerWidth/2-155
crossobj=(dom)?document.getElementById("dropin").style : ie? document.all.dropin : document.dropin
scroll_top=(ie)? document.body.scrollTop : window.pageYOffset
crossobj.top=scroll_top-250
crossobj.width=310
crossobj.left=cen

crossobj.visibility=(dom||ie)? "visible" : "show"
dropstart=setInterval("dropin()",50)
}

function dropin(){
scroll_top=(ie)? document.body.scrollTop : window.pageYOffset
if (parseInt(crossobj.top)<125+scroll_top)
crossobj.top=parseInt(crossobj.top)+40
else{
clearInterval(dropstart)
bouncestart=setInterval("bouncein()",50)
}
}

function staton(st) {
 window.status='Contact Us';
 return true;
 }
function statoff() {
 window.status='';
}


function bouncein(){
crossobj.top=parseInt(crossobj.top)-bouncelimit
if (bouncelimit<0)
bouncelimit+=8
bouncelimit=bouncelimit*-1
if (bouncelimit==0){
clearInterval(bouncestart)
}
}

function dismissbox(){
if (window.bouncestart) clearInterval(bouncestart)
crossobj.visibility="hidden"
}

function doPopup() {

var info='<TABLE WIDTH=310 BGCOLOR="#000000" CELLPADDING=4 CELLSPACING=0><TR><TD><TABLE BGCOLOR="#FFFFCC" CELLSPACING=0 CELLPADDING=5><TR><TD>'
+ '<DIV CLASS="header" ALIGN="center">Join Tek-Tips<SUP>&reg;</SUP> Today!</DIV>'
+ '<P ALIGN="Center">Join your peers on the Internet\'s largest technical computer professional community.<BR>It\'s easy to <a href="#"><B>join</B></A> and it\'s free.</P>'
+ '<P><B>Here\'s Why Members Love Tek-Tips Forums:</B>'
+ '<UL>'
+ '<LI>Talk To Other Members</LI>'
+ '<LI>Notification Of Responses To Questions</LI>'
+ '<LI>Favorite Forums One Click Access</LI>'
+ '<LI>Keyword Search Of All Posts, And More...</LI>'
+ '</UL></P>'
+ '<P ALIGN="Center"><a href="#"><b>Register</b></a> now while it\'s still free!</p>'
+ '<P ALIGN="Center">Already a member?  <a href=javascript:dismissbox()><b>Close</b></a> this window and log in.</P>'
+ '<P ALIGN="Center"><font size=3><a href="#"><B>Join Us</B></A>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href=javascript:dismissbox()><b>Close</b></a></font></p>'
+ '</TD></TR></TABLE></TD></TR></TABLE>';
if (ie) {
 document.all.dropin.innerHTML = info;
 document.all.dropin.left='200';
  } 
   else if (ns4) {
  document.layers['dropin'].document.open();
  document.layers['dropin'].document.write(info);
  document.layers['dropin'].document.close();
 }
 else if (dom) {
  document.getElementById('dropin').innerHTML= info;
 }


initbox();
}
//-->
</script>
<div id="dropin" style="position:absolute;visibility:hidden;top:125;"></div>

</body>

</html> 

<div style="position: absolute; top: 10; right: 10; width: 148; height: 18;cursor:hand">
<input type="button" name="Button" value="查看源代码" onClick= 'window.location = "view-source:" + window.location.href'></div>


评论数: 来源:不详

关键字:窗口
相关文章

网大首页 - 网站地图 - 广告服务 - 关于网大 - 招聘信息 - 联系我们
Copyright (C) 1999-2005 NETBIG.COM (CHINA) LIMITED All Rights Reserved
粤B-20050190