注册 登录
编程论坛 ASP技术论坛

新手第一次作业,提示错误。请高手帮看看。

kelind 发布于 2011-06-11 22:37, 545 次点击
错误提示:错误类型:
Active Server Pages, ASP 0140 (0x80004005)
@ 命令必须是 Active Server Page 中的第一个命令。
/dollar/oiltank/tank2.asp, 第 4 行

代码:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.
<html xmlns="http://www.
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
</head>

<%
 sub submit_click()
  dim rs
  dim sql
  dim zl
  dim h
  dim v
  dim midu
  h=Request.Form("h")
  sql="select v from s1 where h="&h
  set rs=conn.execute(sql)
  if not rs.eof then
  v=rs("v")
  midu=Request.Form("midu")
  h=Request.Form("h")
  zl=v*midu
  %>
  油高:<% response.Write(h)%>
  容积:<% response.Write(v)%>
  密度:<% response.Write(midu)%>
  质量:<% response.Write(zl)%>
  <%
  else
  response.Write("容积表没有这个油高")
  end if
  end sub
  %>
 
<body>
<form id="form1" name="form1" method="post" action="tank2.asp">
  <label>油高
    <input name="h" type="text" id="h" tabindex="0" size="10" />
  </label>
  <label>密度
    <input name="midu" type="text" id="midu" tabindex="1" size="10" />
  </label>
  <label>
    <input type="submit" name="submit" id="submit" value="测算" tabindex="2" onClick="submit_click()" class="button"/>
  </label>
</form>
<p>&nbsp;</p>
<p>&nbsp;</p>
</body>
</html>
4 回复
#2
kelind2011-06-11 22:55
回复 楼主 kelind
只有本站会员才能查看附件,请 登录

调度后出来这个,是什么东西?
#3
kelind2011-06-11 22:58
action="tank2.asp">原来想跳转,所以设为tank2.asp
将action=""后,出来上楼这个警告,不知说的什么?
#4
kelind2011-06-15 00:07
有人能帮一下吗?
#5
dzt00012011-06-15 08:35
请给tank2.asp这个页面的代码。
1