⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 qq菜单2.asp

📁 较为详细的介绍了asp自定义的各种函数,方便asp的各种开发.
💻 ASP
字号:
<%
response.Buffer=true
hg=22  'head height; No raise
bhg=402   'bodyheight; Can raise
mnum=7    'menuitem;   Can raise
%>
<HTML><HEAD><TITLE>菜单</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META content="Microsoft FrontPage 5.0" name=GENERATOR>

<STYLE>
.headtd1 {
	BORDER-RIGHT: #0077ff 2px outset; BORDER-TOP: #00bbff 2px outset; FONT-SIZE: 9pt; BACKGROUND: #00a4e1; BORDER-LEFT: #00bbff 2px outset; CURSOR: hand; BORDER-BOTTOM: #0077ff 2px outset
}
.headtd2 {
	BORDER-RIGHT: #0077ff 2px outset; BORDER-TOP: #60d3ff 2px outset; FONT-SIZE: 9pt; BACKGROUND: #20c1ff; BORDER-LEFT: #60d3ff 2px outset; CURSOR: default; BORDER-BOTTOM: #0077ff 2px outset
}
.bodytd {
	BORDER-RIGHT: #0077ff 2px outset; BORDER-TOP: #b0d8ff 2px outset; FONT-SIZE: 9pt; BACKGROUND: #99ccff; BORDER-LEFT: #b0d8ff 2px outset; BORDER-BOTTOM: #0077ff 2px outset
}
TD {
	FONT-SIZE: 9pt
}
A {
	FONT-SIZE: 9pt; COLOR: #0066cc; TEXT-DECORATION: none
}
A:hover {
	FONT-SIZE: 9pt; COLOR: #990000
}
.LeftNavUp {
	 border: 3px outset #00FFFF;  padding-left:3; padding-right:4; padding-top:3; padding-bottom:2;background-color:#CCCCFF 
}
.LeftNavOff {

}
</STYLE>
<SCRIPT language=JavaScript>
var headHeight =<%=hg%>;     /* 22*/
var bodyHeight =<%=bhg%>; /* 202*/
var objcount =<%=mnum%>;
var step = 10;
var moving = false;
function showme(obj1, obj2)
{
	if (moving)
		return;
	moving = true;
	for(i=0;i<document.all.tags('td').length;i++)
		if (document.all.tags('td')[i].className.indexOf('headtd') == 0)
			document.all.tags('td')[i].className = 'headtd1';
	obj2.className = 'headtd2';
	moveme(obj1);
}
function moveme(obj)
{
	idnumber = parseInt(obj.id.substr(4));
	objtop = headHeight * (idnumber - 1);
	objbuttom = bodyHeight + headHeight * (idnumber - 2);
	currenttop = parseInt(obj.style.top);
	if (currenttop >= objbuttom)
	{
		countid = 1;
		for(i=0;i<document.all.tags('div').length;i++)
			if (document.all.tags('div')[i].id == 'item'+countid+'body')
			{
				obj = document.all.tags('div')[i];
				objtop = headHeight * (countid - 1);
				if (countid == idnumber)
				{
					moveup(obj,objtop,false);
					break;
				}
				else
					moveup(obj,objtop,true);
				countid++;
			}
	}
	else if ((currenttop <= objtop) && (idnumber < objcount))
	{
		idnumber++;
		countid = objcount;
		for(i=document.all.tags('div').length-1;i>=0;i--)
			if (document.all.tags('div')[i].id == 'item'+countid+'body')
			{
				obj = document.all.tags('div')[i];
				objbuttom = bodyHeight + headHeight * (countid - 2);
				if (countid == idnumber)
				{
					movedown(obj,objbuttom,false);
					break;
				}
				else
					movedown(obj,objbuttom,true);
				countid--;
			}
	}
}
function moveup(obj,objtop,ismove)
{
	currenttop = parseInt(obj.style.top);
	if (currenttop > objtop)
	{
		obj.style.top = currenttop - step;
		setTimeout('moveup('+obj.id+','+objtop+','+ismove+')',1)
		return;
	}
	moving = ismove;
}
function movedown(obj,objbuttom,ismove)
{
	currenttop = parseInt(obj.style.top);
	if (currenttop < objbuttom)
	{
		obj.style.top = currenttop + step;
		setTimeout('movedown('+obj.id+','+objbuttom+','+ismove+')',1)
		return;
	}
	moving = ismove;
}
</SCRIPT>

</HEAD>
<BODY bgColor=#333366 text=#000000 leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" oncontextmenu="return false;">
<%
response.Write "<DIV id=mainboard style='Z-INDEX:1; BACKGROUND: #99ccff; LEFT: 2px; OVERFLOW: hidden; WIDTH: 120px; POSITION: absolute; TOP: 2px; HEIGHT:"&bhg+hg*(mnum-1)&"px'>"&chr(13)
for wnum=1 to mnum
response.Write "<DIV id=item"&wnum&"body style='Z-INDEX:"&wnum+1&"; LEFT: 0px; OVERFLOW: hidden; WIDTH: 120px; POSITION: absolute; TOP:"
        if wnum=1 then
		   response.write "0"
        else
		   response.write bhg+hg*(wnum-2)		   
        end if		   
response.Write "px; HEIGHT:"&bhg&"px'>"&chr(13)&_  
		       "<TABLE height='100%' cellSpacing=0 cellPadding=2 width='100%' border=0>"&chr(13)&_
			   "<TR><TD class=headtd1 id=item"&wnum&"head onclick=showme(item"&wnum&"body,this) align=middle height=20>休息时间"&wnum&"</TD></TR>"&chr(13)&_
			   "<TR><TD class=bodytd align=middle>"&chr(13)
			   cba
response.Write "</TD></TR></TABLE></DIV>"&chr(13) 
next
response.Write "</DIV>"
sub sethref(hkf1,tg1,st1,ds1)
    response.Write "<a href='"&hkf1&"' target='"&tg1&"' onmousemove="&chr(34)&"window.status='"&st1&"'"&chr(34)&" onmouseout="&chr(34)&"window.status=''"&chr(34)&">"&ds1&"</a>"
end sub
%>


</BODY>

</HTML>
<%sub cba%>
 <TABLE height="100%" cellSpacing=1 cellPadding=1 width="99%" border=0>
     <TR><TD align=middle bgColor=#d9ecff onmouseover="this.className='LeftNavUp'" onmouseout="this.className='LeftNavOff'">
         <A href="#" target=_blank>sdfsdf</A>
     </TD></TR>
     <TR><TD align=middle bgColor=#d9ecff onmouseover="this.className='LeftNavUp'" onmouseout="this.className='LeftNavOff'">
         <A href="#" target=_blank>sdfsdf</A>
     </TD></TR>
     <TR><TD align=middle bgColor=#d9ecff onmouseover="this.className='LeftNavUp'" onmouseout="this.className='LeftNavOff'">
     <%sethref "ba.html","_blank","this is a text for this document","click me please" %>
     </TD></TR>
</TABLE>
<%end sub%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -