<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><link href="../../../../App_Themes/Default/Main.css" type="text/css" rel="stylesheet" /><title>
</title>
<style type="text/css">
.Complete{background:green}
.MouseDown{ background:red}
</style>
</head>
<body>
<form method="post" action="/Product/English/ExamCenter/ReadingSelection/Add.aspx?qid=63&dealtag=ReadingSelection" onkeypress="javascript:return WebForm_FireDefaultButton(event, 'btnAdd')" id="form1">
<div class="aspNetHidden">
<input type="hidden" name="__EVENTTARGET" id="__EVENTTARGET" value="" />
<input type="hidden" name="__EVENTARGUMENT" id="__EVENTARGUMENT" value="" />
<input type="hidden" name="__LASTFOCUS" id="__LASTFOCUS" value="" />
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwULLTIwNDk0NTY3NzQPFgQeA3FpZAUCNjMeB2RlYWx0YWcFEFJlYWRpbmdTZWxlY3Rpb24WAgIDD2QWAgIBDxAPFgYeDURhdGFUZXh0RmllbGQFBE5hbWUeDkRhdGFWYWx1ZUZpZWxkBQdTdGFnZUlEHgtfIURhdGFCb3VuZGdkEBUECeivt+mAieaLqQblsI/lraYG5Yid5LitBumrmOS4rRUEAAEyATMBNBQrAwRnZ2dnFgFmZGT+WN0/RiubN+EwGGQzRFl1dU7jxSFqxRbwb8HewzP7Vg==" />
</div>
<script type="text/javascript">
//<![CDATA[
var theForm = document.forms['form1'];
if (!theForm) {
theForm = document.form1;
}
function __doPostBack(eventTarget, eventArgument) {
if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
theForm.__EVENTTARGET.value = eventTarget;
theForm.__EVENTARGUMENT.value = eventArgument;
theForm.submit();
}
}
//]]>
</script>
<script src="/WebResource.axd?d=izelBHdshxUmbeOD4Gltpk2PDVJ8hX1i6c8eSwQBj7vxxUyNlbTrJxolPRRIfpH6nGNwaKeAKScJp8ngitlYJXACDM9nDTrlk9DKxoTQAeE1&t=635153041278887192" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="/WebResource.axd?d=DR4na8IkbgLfKFXz3COQm10jkRbh4n-zfxOCU2NgxhiSqsRSFbutypWBTbxKQukPy4y99zoAcNiqw7VlfivR85myyVUFGw47WrJLvUSqN8KJlHk9aRgqeMXPSK8Kf0p4q6QEt-Nsy0Ottoky6o2mlQ2&t=635149197643650312" />
<script src="/WebResource.axd?d=cFvxCTU1EtbBPQT5FJsxNwVAZa6qe7ozquyuMkrbeLlm3jkSQWFokknOSaLe9QkNCdqv6zd6RndZ56ySvjyEjTjXhC7C80BcW8NOH3ep5PfJkO7OFZ0q7TlA6bXQykh_e2C9AJocQf_FOkBtLg0DKA2&t=635149197643650312" type="text/javascript"></script>
<script src="/WebResource.axd?d=7plP0MekP_10sDNmfZxzOJVBcegHSS3TZUm5YMQhEGaPVF5YlGGxjQ2X0zYHyXMJwYdEEkpaVutSHi54XElsI9bnhhcj7JVijm4LqZH9wxx-pgNW1Wv8uu5yT4csSskJla5MHjg205UFaYEyL0KhIw2&t=635149197643650312" type="text/javascript"></script>
<script src="/Ajax/ASP.product_english_examcenter_readingselection_add_aspx.ashx?S2rQ9GUBaFmOI9/J4jHtAVMytXnrRXgeegOMiZIOadcgnvMlqoqlXEPnwnRJs4w95tIpP0dORqPmyq4DPf0ex2FlJ2leyNCxDOMJgZJmaI2JzSSj/3p3bFClApa/lhmB" type="text/javascript"></script>
<script src="/WebResource.axd?d=sgksM4x6dFERnjWyfFkgvBGWaXxk6lp0DVeaN9OLViylUAFZtnpImLalMe-W1iP0qYq-3dH5hP4gLtB-UaxycLiefPBhlExSPVJWhvCcP8c1&t=635153041278887192" type="text/javascript"></script>
<div class="aspNetHidden">
<input type="hidden" name="__EVENTVALIDATION" id="__EVENTVALIDATION" value="/wEWDALW/cvGDgKfuLaNAwKfuLaNAwKR15zjDwKS15zjDwKT15zjDwKx34zFAgKi38DGAgK938DGAgLY6OOiAgKMk4HYDwK+rvNO7eNtrFF4uyuwk0hlU+rchL577PVxaRqoN6Lgq6OtUlo=" />
</div>
<div id="QuestionEditorContainer">
<h4> 试题信息部分</h4>
<p><label for="drpStage">学段:</label><select name="drpStage" onchange="javascript:setTimeout('__doPostBack(\'drpStage\',\'\')', 0)" id="drpStage">
<option selected="selected" value="">请选择</option>
<option value="2">小学</option>
<option value="3">初中</option>
<option value="4">高中</option>
</select></p>
<p><label for="drpGrade">年级:</label><select name="drpGrade" id="drpGrade">
</select></p>
<p><label for="drpSemester"> 学期:</label><select name="drpSemester" id="drpSemester">
<option value="-1">请选择</option>
<option value="0">上学期</option>
<option value="1">下学期</option>
</select>
</p>
<h4> 选项和答案信息部分</h4>
<p><span>试题标识:</span><input name="txtQuestionMaterialTitle" type="text" id="txtQuestionMaterialTitle" class="text" /></p>
</div>
<div id="ideaTxt">
<p>所给短文:<textarea id="txtIntro" name="txtIntro" cols="100" rows="8" style="width: 400px;height: 100px;"></textarea></p>
</div>
<p>
<label for="drpQuestionCount">问题个数:</label>
<select id="drpQuestionCount" name="drpQuestionCount">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5" selected="selected">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
</select>
</p>
<div id="AnswerListContainer"></div>
<div id="RightAnswerContainer"></div>
<div id="Index"></div>
<p id="btnLine">
<input type="submit" name="btnAdd" value="提交" onclick="return confirm('确认提交吗');" id="btnAdd" class="btn" />
<input type="submit" name="btnBack" value="返回" id="btnBack" class="btn" />
</p>
<script type="text/javascript">
$(function () {
$("#drpQuestionCount").change(function () {
SetAnswerList();
});
$("#drpQuestionCount").change();
var drpQuestionCount = $("#drpQuestionCount").val();
for (var i = 0; i < drpQuestionCount; i++) {
$("#drpAnswerCount" + i + "").change();
}
})
//设置答案
var arrAnswerList = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J"];
function SetAnswerList() {
var drpQuestionCount = $("#drpQuestionCount").val();
var htmlAnswer = "";
var htmlIndex = "";
for (var i = 0; i < drpQuestionCount; i++) {
htmlAnswer += "<div class=\"div" + i + "\"><p><label for=\"txtQuestion" + i + "\"><strong>" +(i + 1) + "</strong>.</label>";
htmlAnswer += "<input type=\"text\" style=\"width:800px\" id=\"txtQuestion" + i + "\" name=\"txtQuestion" + i + "\" />";
htmlAnswer += "<label>选项个数:</label>";
htmlAnswer += "<select id=\"drpAnswerCount" + i + "\" name=\"drpAnswerCount" + i + "\" onchange =\"SetAnswerCount('drpAnswerCount" + i + "');SetRightAnswerCount(" + i + ");\"></select>";
htmlAnswer += "<div id=\"divAnswer" + i + "\"></div>";
htmlAnswer += "<label>解析:</label><input type=\"text\" style=\"width:300px\" id=\"txtAnalyze" + i + "\" name=\"txtAnalyze" + i + "\"/></p>";
htmlAnswer += "<label>正确答案:</label>"; ;
htmlAnswer += "<select id=\"drpRightAnswer" + i + "\" name=\"drpRightAnswer" + i + "\"></select><input type=\"button\" onclick=\"Comlete(this);\" value=\"确认\" id=\"btn" + i + "\" name=\"btn" + i + "\" /></p></div>";
htmlIndex += "<input type=\"button\" value=\"" + (i + 1) + "\" onclick=\"QuestionIndex(this);SetColor(this)\" id=\"btnIndex" + i + "\" name=\"btnIndex" + i + "\" /> ";
}
$("#AnswerListContainer").html(htmlAnswer);
$("#Index").html(htmlIndex);
for (var m = 0; m < drpQuestionCount; m++) {
for (var n = 0; n < 5; n++) {
$("#drpAnswerCount" + m + "").append("<option value=\"" + (n + 1) + "\">" + (n + 1) + "</option>");
}
$("#drpAnswerCount" + m + "").val(4);
$("#drpRightAnswer" + m + "").children().remove();
var drpRightAnswerCount = $("#drpAnswerCount" + m + "").val();
for (var j = 0; j < drpRightAnswerCount; j++) {
$("#drpRightAnswer" + m + "").append("<option value=\"" + j + "\">" + arrAnswerList[j] + "</option>");
}
SetAnswerCount("drpAnswerCount" + m);
}
//首次加载隐藏
for (var k = 0; k < drpQuestionCount; k++) {
if (k == 0) {
$(".div" + 0 + "").show();
}
else {
$(".div" + k + "").hide();
}
}
}
//设置答案个数
function SetAnswerCount(obj) {
var count = $("#" + obj + "").val();
var htmlAnswerCount = "";
for (var i = 0; i < count; i++) {
htmlAnswerCount += "<p><label for=\"txtAnswer" + i + "\">" + arrAnswerList[i] + ".</label>";
htmlAnswerCount += "<input type=\"text\" style=\"width:300px\" id=\"txtAnswer" + (obj + i) + "\" name=\"txtAnswer" + (obj + i) + "\"/></p>";
}
$("#" + obj + "").parent().next().html(htmlAnswerCount);
}
//设置正确答案个数
function SetRightAnswerCount(obj) {
var count = $("#drpAnswerCount" + obj + "").val();
$("#drpRightAnswer" + obj + "").children().remove();
for (var j = 0; j < count; j++) {
$("#drpRightAnswer" + obj + "").append("<option value=\"" + j + "\">" + arrAnswerList[j] + "</option>");
}
}
//设置索引点击隐藏事件
function QuestionIndex(obj) {
var id = $(obj).attr("id");
var ids = id.toString().substring(8);
var count = $("#drpQuestionCount").val();
for (var j = 0; j < count; j++) {
if (j == ids) {
$(".div" + j + "").fadeIn("fast");
}
else {
$(".div" + j + "").fadeOut("fast");
}
}
}
//设置索引点击颜色事件
function SetColor(obj) {
var id = $(obj).attr("id");
var ids = id.toString().substring(8);
var count = $("#drpQuestionCount").val();
for (var j = 0; j < count; j++) {
if (j == ids) {
$("#btnIndex" + j + "").addClass("MouseDown");
}
else {
$("#btnIndex" + j + "").removeClass("MouseDown");
}
}
}
function Comlete(obj) {
var id = $(obj).attr("id");
var ids = id.toString().substring(3);
$("#btnIndex" + ids + "").addClass("Complete");
}
</script>
</form>
</body>
</html>