浏览器对象能否用于服务器端脚本?
我的asp文档代码为:
<html>
<head>
<script language=VBScript runat=server>
if request.form("submit")="显示时间" then
document.form1.txtTime.value=time()
end if
</script>
</head>
<body>
<form name=form1 method=post>
<input type=submit name=submit value=显示时间>
<input type=text name=txtTime>
</form>
</body>
</html>
运行该文档,老是报错,是不是浏览器内置对象不能在服务器端脚本中使用?有知道的指点一下!谢谢!
问题点数:20、回复次数:2Top
1 楼blueonly(认真编程,低调生活。)回复于 2006-03-08 18:45:30 得分 10
document.form1.txtTime.value=time()
在ASP中是不可以的Top
2 楼blueonly(认真编程,低调生活。)回复于 2006-03-08 18:48:06 得分 10
<html>
<head>
</head>
<body>
<form name=form1 method=post>
<input type=submit name=submit value=显示时间>
<input type=text name=txtTime>
</form>
<%
if request.form("submit")="显示时间" then
>%
<script>
document.form1.txtTime.value=<%= time() %>;
</script>
<%
end if
%>
</body>
</html>
Top




