存为aspx文件试试效果
<%@ Page Language="VB" ContentType="text/html" ResponseEncoding="gb2312" %>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>Test Document</title>
<script language="vb" runat="server">
sub page_load(sender as object,e as eventargs)
label1.attributes.cssstyle("position")="absolute"
label1.attributes("onmousedown")="moveit(this)"
end sub
</script>
<script language="javascript">
function moveit(obj){
obj.setCapture();
var xx=event.offsetX,yy=event.offsetY;
function obj.onmousemove(){
if (obj){
obj.style.left=event.x-xx;
obj.style.top=event.y-yy;
}
}
function obj.onmouseup(){obj.releaseCapture();obj=false;}
}
</script>
<style>
td,span{text-align:center;font-size:9pt}
</style>
</head>
<body>
<asp:label ID="label1" runat="server" text="标题" BackColor="#9999CC" Width="50%" Height="30"/>
<br/>
<br/>
<table border="1" width="50%">
<tr>
<td>表格内容</td>
</tr>
</table>
</body>
</html>