一段ASP设计的问题 请哪位大侠指点下。。

<!--root.htm中的程序-->
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>网页例子</title>
<script language=vbs runat=client>
</script>
</head>
<body>
<form name=form1 method="POST" action=root.asp>
<table border="0" width="60%" id="table1">
<tr>
<td width=50 style="font-size: 2" align="right"><font size="3">a=</font></td>
<td width=100><input type="text" name="T1" size="20" value=0></td>
<td width=50 align="right">b=</td>
<td width=100><input type="text" name="T2" size="20" value=0></td>
<td width=50 align="right">c=</td>
<td width=100><input type="text" name="T3" size="20" value=0></td>
</tr>
</table>
<p align="center"><input type="submit" value="提交" name="B1">  <input type="reset" value="重置" name="B2"></p>
</form>
</body>
</html>

<!--root.asp中的程序-->
<%
dim a,b,c,d,n,x1,x2
a=CSng(Request.Form("T1"))
b=CSng(Request.Form("T2"))
c=CSng(Request.Form("T3"))
d=b*b-4*a*c
Response.Write "<font face=隶书 size=2>"
Response.Write "方程;"
Response.Write "a=" & a & ",b=" & b & ",c=" & c & "<br>"
if d<0 Then
Response.Write "没有根"
elseif d=0 then
Response.Write "一个根"
x1=(-b-sqr(d))/(2*a)
Response.Write "x1=" & x1
else
Response.Write "两个根"
x1=(-b-sqr(d))/(2*a)
Response.Write "x1=" & x1 & " "
x2=(-b+sqr(d))/(2*a)
Response.Write "x2=" & x2
end if
Response.Write "</font>"
%>

执行 root.htm 点“提交”为什么结果总是不对。。(在页面中显示root.asp的内容)
正确结果应该显示:
方程:a=2,b=-4,c=2
一个根:x1=1
执行完的结果是这个。。
不是在设计视图中打开的。。 就是在代码区打开的。。IIS我也装了。。

1.你要把这段代码粘贴到DW的代码区 而不是设计视图的位置 或者用记事本直接打开这个ASP页面 粘贴上
2.要用IIS来跑这个程序 浏览器自己解释不了
温馨提示:答案为网友推荐,仅供参考
第1个回答  2010-12-10
什么结果不对 说清楚点本回答被网友采纳
第2个回答  2010-12-10
This system USES ASP, widely used in SQL2005 related technologies, design an interface.

The system uses the widely used ASP, SQL2005, Dreamweaver8 related technologies, designed a user-friendly, more humane prominent feature simple and quick and more practical BLOG. Authorized, the administrator can be registered through the WEB browser, the system back to the realization of human-computer interaction on the registered blog user management, account management, links to management. Blog user in the foreground can manage their own blog space, including the release of their web logs, and related personnel exchanges and communication, and delete the comments and other visitors. In addition, the visitors through registration, log into the blog space for comment. Visitors not registered by an anonymous comment on the blog space.
第3个回答  2010-12-10
你应该把输入什么内容,结果是什么公布出来,我们才能好解答你的问题
第4个回答  2010-12-10
你是想在root.htm中显示root.asp的内容吧?用js可以实现,或者在root.asp中重新转向root.htm并且把要显示的内容传递过去就可以了
第5个回答  2010-12-10
看看你浏览器地址栏里显示的什么?file开头!你根本没在服务器上运行程序!

相关了解……

你可能感兴趣的内容

本站内容来自于网友发表,不代表本站立场,仅表示其个人看法,不对其真实性、正确性、有效性作任何的担保
相关事宜请发邮件给我们
© 非常风气网