⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 questionedit.asp

📁 用ASP设计的一个网上问卷系统,用于网上调查问卷系统的实现
💻 ASP
字号:
<!--#include file="../Include/Config.asp"-->
<link rel="stylesheet" href="../Css/Admin.css" type="text/css" />
<%
Survey_id=request.QueryString("Survey_id")
Question_id=request.QueryString("Question_id")
sql="select * from [Survey] where Survey_id="&Survey_id
rs.open sql,conn,1,1
if rs("Survey_isAuditing")=True then
call ShowAlert("对不起,以审核的问卷不可以再编辑","" )
end if
rs.close
sql="select * from [Question] where Question_id="&Question_id
rs.open sql,conn,1,1
Qtype=rs("Question_type")
Question_content=rs("Question_content")
Question_answer=split(rs("Question_answer"),"&")

select case rs("Question_type")
     case "1","2": call type1()
	 case "3","4": call type2()
	 case "5": call type3()
end select
rs.close
%>
<script language="javascript" src="../Js/QuestAdd.js"></script>
<%sub type1()%>
<form name="form1" action="QuestionSave.asp?Survey_id=<%=Survey_id%>&Question_id=<%=Question_id%>&action=edit" method="post" onSubmit="return SubQuestion();">
<input type="hidden" value=<%=Qtype%> name="Question_type">
<input type="hidden" value="" name="Question_answer">
<input type="hidden" value="" name="Question_result">
问题:<input name="Question_content" type="text" size="40" value="<%=Question_content%>">
<br/><br/>
备选项:
<ul type="A" id="ulAnswer">
<%for each QueAns in Question_answer%>
<li><input type="text" name="Answer" value="<%=QueAns%>"></li>
<%next%>
</ul>
<div id="button">
<input type="button" name="MoreAnswer1" value="增加选项" onClick="MoreAnswer();">
<input type="button" name="LessAnswer1" value="减少选项" onClick="LessAnswer();">
<input type="submit" value="修改题目">
<input type="button" name="Back" value="返回" onClick="location.href='QuestionList.asp?Survey_id=<%=Survey_id%>'">
</div>
</form>
<%end sub%>

<%sub type2()%>
<form name="form1" action="QuestionSave.asp?Survey_id=<%=Survey_id%>&Question_id=<%=Question_id%>&action=edit" method="post" onSubmit="return SubQuestion();">
<input type="hidden" value=<%=Qtype%> name="Question_type">
<input type="hidden" value="" name="Question_answer">
<input type="hidden" value="" name="Question_result">
问题:<input name="Question_content" type="text" size="40" value="<%=Question_content%>">
<br/><br/>
备选项:
<ul type="A" id="ulAnswer">
<%for i=0 to (ubound(Question_answer)-1)%>
<li><input type="text" name="Answer" value="<%=Question_answer(i)%>"></li>
<%next%>
<li><input type="text" name="Answer" value="<%=Question_answer(ubound(Question_answer))%>"><input type="text" name="Answer_2" readonly="true" value="用户在此框输入自定义文本"></li>
</ul>
<div id="button">
<input type="button" name="MoreAnswer1" value="增加选项" onClick="MoreAnswer_2();">
<input type="button" name="LessAnswer1" value="减少选项" onClick="LessAnswer_2();">
<input type="submit" value="修改题目">
<input type="button" name="Back" value="返回" onClick="location.href='QuestionList.asp?Survey_id=<%=Survey_id%>'">
</div>
</form>
<%end sub%>

<%sub type3()%>
<form name="form1" action="QuestionSave.asp?Survey_id=<%=Survey_id%>&Question_id=<%=Question_id%>&action=edit" method="post" onSubmit="return SubQuestion();">
<input type="hidden" value=<%=Qtype%> name="Question_type">
<input type="hidden" value="" name="Question_answer">
<input type="hidden" value="" name="Question_result">
问题:<br/><input name="Question_content" type="text" size="40" value="<%=Question_content%>">
<br/><br/>
回答框:<br/>
<textarea rows="3" readonly="readonly"></textarea>
<br/><br/>
<div id="button">
<input type="submit" value="修改题目">
<input type="button" name="Back" value="返回" onClick="location.href='QuestionList.asp?Survey_id=<%=Survey_id%>'">
</div>
</form>
<%end sub%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -