|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
优点:简单易学、开发速度快、有很多年“历史”,能找到非常多别人做好的程序来用、配合activeX功能强大,很多php做不到的asp+activeX能做到,例如银行安全控件静态|掌握|网页 <form action="calscore.asp?action=do" method="post" name=form1> ... </form>
<!--#include file="connect.asp"-->
<% if session("logstatus")<>1 then %>
<p align="center">
<font size="5" ><b>你还没有登录,没有权力阅读本页,请先<a href="login.asp">登录</a>!</b></font></p>
<%
else
'读取login.htm附带的SubjectNo、StudentID及Name参数值
Subject=Request("Subject")
StudentID=Request("StudentID")
Name=Request("Name")
******** 途径和文件的创立 ********************************************************************
'格局化日期
Function format(date)
format=datepart("yyyy",date)&"年"&datepart("m",date)&"月"&datepart("d",date)&"日 "&formatdatetime(date,vbshorttime)
End Function
dim fmonth,fday,fhour,fminute,fsecond
fmonth=month(date)
if len(month(date))<2 then fmonth="0"&month(date) end if
fday=day(date)
if len(day(date))<2 then fday="0"&day(date) end if
fhour=hour(now())
if len(hour(now()))<2 then fhour="0"&hour(now()) end if
fminute=minute(now())
if len(minute(now()))<2 then fminute="0"&minute(now()) end if
fsecond=second(now())
if len(second(now()))<2 then fsecond="0"&second(now()) end if
newspath=year(date)&fmonth&fday
newsurl=fhour&fminute&fsecond
putdate=format(now())
if request("action")="do" then
path=server.MapPath("kaoshi") /.界说的一个文件
set fso=server.CreateObject("Scripting.FileSystemObject")
if fso.FolderExists(path)=false then
fso.CreateFolder(path)
end if
path=path&"/"&newspath
if fso.FolderExists(path)=false then
fso.CreateFolder(path)
end if
path=path&"/"&newsurl&".shtml" /.生成SHTML页面
set ts=fso.OpenTextFile(path,2,true,-2)
******** 生成HTML页面 ***********************************************************************
ts.writeline"<html>"
ts.writeline"<head>"
ts.writeline"<title>"&name&""
ts.writeline","&subject&""
ts.writeline" - 成就了局</title>"
ts.writeline"<meta http-equiv=""Content-Type"" content=""text/html; charset=gb2312"">"
ts.writeline"<link rel=""stylesheet"" href=""CSS.css"" type=""text/css"">"
ts.writeline"</head>"
ts.writeline""
ts.writeline"<body bgcolor=""#FFFFFF"" text=""#000000"">"
ts.writeline"<table width=""100%"">"
ts.writeline"<tr>"
ts.writeline"<td width=""100%"">"
ts.writeline"<h2>"
ts.writeline""&Name&""
ts.writeline",你的测验成就以下表:</h2>"
dim score
score=0
sqlt="select * from 考题类型"
rst.open sqlt,conn,1,1
do while not rst.eof
tn=rst("id")
tname=rst("name")
ts.writeline"<b>"
ts.writeline""&tname&""
ts.writeline"</b><br><br>"
sql="Select * From "&Subject&" where 标题类型="&tn&" order by 标题序号"
rs.open sql,conn,2,2
while not rs.eof
answer=rs("准确谜底")
select case rs("标题类型")
case 1:
selection=Request("No"&rs("标题序号"))
ts.writeline rs("标题序号")
ts.writeline"、"&selection&"<br>"
case 2:
selection=""
for n=1 to 4
if not Request("No"&rs("标题序号")&"-"&n)="" then
selection=selection&Request("No"&rs("标题序号")&"-"&n)
end if
next
ts.writeline rs("标题序号")
ts.writeline" 、"&selection&"<br>"
case 3:
selection=Request(rs("选择项1"))
ts.writeline rs("标题序号") </p> 只要你想学,就没什么优缺点,上面那位大哥已经把网上的评论说了,但我认为想学哪个都一样,不然它就不可能在当今时代数字艺术方面存活到今天 |
|