高手请进
leo98 2003-12-15 05:18:30 小弟在学习ASP时遇到一些问题,请各位ASP大虾帮忙一下我这位ASP迷途小糕羊,我的代码如下:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<head>
<META name=VI60_defaultClientScript content=VBScript>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="../include/style.css" type="text/css">
</head>
<script language="vbscript">
sub showheight(table,layer)
layer.offsetheight=table.offsetheight
end sub
</script>
<body>
<%
dim i
dim tbl(10),lay(10)
for i=1 to 10
tbl(i)="table" & i
lay(i)="layer" & i
next
for i = 1 to 10
Response.Write "<table width=700px border=0 cellpadding=1 cellspacing=0>"
Response.Write "<tr>"
Response.Write "<td width=100px>" & tbl(i) & "</td>"
Response.Write "<td width=600px>"
Response.Write "<table width=600px height=40px border=1 cellpadding=1 cellspacing=0 id=" & tbl(i) & ">"
Response.Write "<tr>"
'24个空格
Response.Write "<td width=25px> </td>"
Response.Write "<td width=25px> </td>"
Response.Write "<td width=25px> </td>"
Response.Write "<td width=25px> </td>"
Response.Write "<td width=25px> </td>"
Response.Write "<td width=25px> </td>"
Response.Write "<td width=25px> </td>"
Response.Write "<td width=25px> </td>"
Response.Write "<td width=25px> </td>"
Response.Write "<td width=25px> </td>"
Response.Write "<td width=25px> </td>"
Response.Write "<td width=25px> </td>"
Response.Write "<td width=25px> </td>"
Response.Write "<td width=25px> </td>"
Response.Write "<td width=25px> </td>"
Response.Write "<td width=25px> </td>"
Response.Write "<td width=25px> </td>"
Response.Write "<td width=25px> </td>"
Response.Write "<td width=25px> </td>"
Response.Write "<td width=25px> </td>"
Response.Write "<td width=25px> </td>"
Response.Write "<td width=25px> </td>"
Response.Write "<td width=25px> </td>"
Response.Write "<td width=25px> </td>"
'''''''''''''''''''''''''''''''''''''''''''''''''
Response.Write "</tr>"
Response.Write "</table>"
Response.Write "</td>"
Response.Write "</td>"
Response.Write "</tr>"
Response.Write "</table>"
Response.Write "<div id=" & lay(i) & " name=" & lay(i) & " style='position:absolute; width:25px;background-color: #FFFF00'>" & lay(i) & "</div>"
Response.Write"<br>"
showheight tbl(i),lay(i)
next
%>
</body>
</html>
当我运行该代码的时候,就会出现以下问题:
Microsoft VBScript 运行时错误 错误 '800a000d'
类型不匹配: 'showheight'
当我用msgbox调试程序的时候,就会出现:
没有权限: 'msgbox'
我本来想动态建立10个TABLE,10个LAYER,LAYER的高度和左对齐跟TABLE(有ID的)一样,还没有达到效果,问题就来了,请各位鼎力相助.