Javascript是客户端脚本语言,而VB.net是服务器端的,怎么翻译?
解决方案 »
- [急]js实现点击td里的按钮,这个td里增加一个小图片,点击另外一个按钮减少一个图片
- 360顽固木马专杀工具 千万别用 会删除Oracle服务
- 关闭showModalDialog,同时重新绑定GridView
- 求个注册模块代码
- 怎样添加自己的一个dateset,将其绑定到listbox?
- 帮忙看一个错误是什么意思,谢谢大家
- 关于DataGrid分页的问题
- 关于编辑信息的内容
- 请问如何从数据库中选出某段时间内的帖子!
- 如何在业务对象中使用ASP.NET 的内部 Server 对象?
- asp.net后,如何像asp那样request.servervariable("")得到变量值?
- DropDownList数据绑定时,能不能把两个字段合在一起显示啊?
<%@ Page Language="VB" ContentType="text/html" ResponseEncoding="gb2312" %>
<script language="VBscript" >
const headHeight=22,bodyHeight=202
const objCount=4, step=10
dim bolMoving
bolMoving=false
<!-- -->
sub showme(obj1,obj2)
for i=0 to document.all.tags("td").length-1
if(left(document.all.tags("td")(i).classname,Len(document.all.tags("td")(i).classname)-1)="headtd") then
document.all.tags("td")(i).classname="headtd1"
end if
next
obj2.classname="headtd2"
moveme(obj1)
end sub
<!--` -->
sub moveme(obj)
idnumber=Cint(mid(obj.id,5,1))
objtop=(idnumber-1)*headheight
objbottom=bodyheight+headheight*(idnumber-2)
currenttop=Cint(left(obj.style.top,len(obj.style.top)-2))
if(currenttop>=objbottom) then
for i=1 to document.all.tags("div").length-1
if(document.all.tags("div")(i).id="item"&i&"body") then
if(i<=idnumber) then
moveup(document.all.tags("div")(i))
end if
end if
next
elseif(currenttop<=objbottom) then
for i=document.all.tags("div").length-1 to 1 step -1
if(document.all.tags("div")(i).id="item"&i&"body") then
if(i>idnumber) then
movedown(document.all.tags("div")(i))
end if
end if
next
end if
end sub
<!-- -->
sub moveup(obj)
currenttop=Cint(left(obj.style.top,len(obj.style.top)-2))
idnumber=Cint(mid(obj.id,5,1))
if (currenttop>22*(idnumber-1)) then
currenttop=currenttop-step
obj.style.top=currenttop
call settimeout("moveup("+obj.id+")",1)
end if
end sub
<!-- -->
sub movedown(obj)
currenttop=Cint(left(obj.style.top,len(obj.style.top)-2))
idnumber=Cint(mid(obj.id,5,1))
objbottom=bodyheight+headheight*(idnumber-2)
if(currenttop<objbottom) then
currenttop=currenttop+step
obj.style.top=currenttop
call settimeout("movedown("+obj.id+")",1)
end if
end sub
</script>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type='text/css'>
.headtd1 { background: #00A4E1; border: 2px outset; border-color: #00BBFF #0077FF #0077FF #00BBFF; cursor: hand; font-size: 9pt}
.headtd2 { background: #20C1FF; border: 2px outset; border-color: #60D3FF #0077FF #0077FF #60D3FF; cursor: hand; font-size: 9pt}
.bodytd {
background: #99CCFF;
border: 2px outset;
border-color: #B0D8FF #0077FF #0077FF #B0D8FF;
font-size: 9pt;
}
</style>
<link href="CSS/POS" rel="stylesheet" type="text/css">
</head>
<body bgcolor='#FFFFFF' text='#000000'>
<div id='mainboard' style='position:absolute; left:0px; top:93px; width:120px; height:268px;z-index:1; overflow: hidden; background: #99CCFF;' class="bodytd">
<div id='item1body' style='position:absolute; left:0px; top:0px; width:120px; height:202px;z-index:2; overflow: hidden'>
<table width='100%' border='0' height='100%' cellpadding='2' cellspacing='0'>
<tr>
<td id='item1head' height='20' class='headtd2' align='center' onClick="call showme(item1body,item1head)" >校办发文
</td>
</tr>
<tr>
<td class='bodytd' align='center'>test1</td>
</tr>
</table>
</div>
<div id='item2body' style='position:absolute; left:0px; top:202px; width:120px; height:202px;z-index:3; overflow: hidden'>
<table width='100%' border='0' height='100%' cellpadding='2' cellspacing='0'>
<tr>
<td id='item2head' height='20' class='headtd1' align='center' onClick="call showme(item2body,item2head)">菜单2
</td>
</tr>
<tr>
<td class='bodytd' align='center'>test2</td>
</tr>
</table>
</div>
<div id='item3body' style='position:absolute; left:0px; top:224px; width:120px; height:202px; z-index:4; overflow: hidden'>
<table width='100%' border='0' height='100%' cellpadding='2' cellspacing='0'>
<tr>
<td id='item3head' height='20' class='headtd1' align='center' onClick="call showme(item3body,item3head)">菜单3
</td>
</tr>
<tr>
<td class='bodytd' align='center'>test</td>
</tr>
</table>
</div>
<div id='item4body' style='position:absolute; left:0px; top:246px; width:120px; height:202px;z-index:5; overflow: hidden'>
<table width='100%' border='0' height='100%' cellpadding='2' cellspacing='0'>
<tr>
<td id='item4head' height='20' class='headtd1' align='center' onClick="call showme(item4body,item4head)">菜单4
</td>
</tr>
<tr>
<td class='bodytd' align='center'>test</td>
</tr>
</table>
</div>
</div>
<p></p> <br>
<br>
<br>
<br>
<hr align="left" size="7" color="#0066CC" class="POS" >
</body>
</html>