链接类

VML

按钮类

标题类

表单类

表格类

菜单类

窗口类

对象类

滚动条

键盘类

框架类

例子类

模拟类

日期类

色彩类

鼠标类

数学类

图片类

文字类

下拉框

样式类

游戏类

状态栏

资料类

字幕类

其它类

 ·Div+CSS简单的...
 ·在flash之上的飘...
 ·if IE
 ·event.canc...
 ·Do,UnDo,Re...
 ·切换效果
 ·脚本写的IE右键助手
 ·确认对话框
 ·setInterva...
 ·客户端信息检测
您当前位置:好素材首页 -> 网页特效 -> 例子类
查看信息

下落的窗口
好素材网 www.HaoSc.com 02月22日 11:49

[查看演示]  源码如下
----------------------------------------------------------
<!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>


此信息共 1 页 [1]