基于jQuery的试卷自动排版系统实现代码

2020-05-22 17:08:39易采站长站整理

</label>
<label>
<input type=”radio” name=”prob6″ value=”C” />父
</label>
<label>
<input type=”radio” name=”prob6″ value=”E” />和班的成绩班的成绩班的成绩班的成绩班的成绩
</label>
<label>
<input type=”radio” name=”prob6″ value=”F” />所班的成绩班的成绩班的成绩
</label>
<label>
<input type=”radio” name=”prob6″ value=”G” />严班的班的成绩班的成绩班的成绩班的成绩
</label>
<label>
<input type=”radio” name=”prob6″ value=”H” />父
</label>
</div>
</div>
</ol>
</form>
</body>
</html>

样式文件(CSS)

/* YahooUI CSS Reset */
body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,textarea,p,blockquote,th,td { padding: 0; margin: 0; }
table { border-collapse: collapse; border-spacing: 0; }
fieldset,img { border: 0; }
address,caption,cite,code,dfn,em,strong,th,var { font-weight: normal; font-style: normal; }
ol,ul { list-style: none; }
caption,th { text-align: left; }
h1,h2,h3,h4,h5,h6 { font-weight: normal; font-size: 100%; }
q:before,q:after { content:”; }
abbr,acronym { border: 0;}
label { padding: 0; margin: 0; }
/* My css */
.Choices { line-height: 150%; margin: 5px 0; }
.Page { height: 500px; border: solid 1px gray; }
#olThePaper, .Display { padding: 0; width: 500px; }
/* NOTICE: the width of .Display and #olThePaper should be the SAME. */
.Display { float: left; }
#divToolbar { height: 35px; }
#divPrev, #divNext { float: left; width: 100px; height: 30px; border: solid 1px green; background-color: #999999; }
#divPageInfo { float: left; width: 100px; height: 30px; }
#divTimer { float: left; width: 500px; height: 30px; }

/*for debugging… perhaps for non-IE only*/
/**label { outline: dotted 1px red; background-color: gray; }**/
/**div {outline: dashed 1px blue;}**/

下面是重点,TTestPaperProcessor.js:

/**
*
* @param {String} PaperOlId the id value of the ol tags indicating pages.
* @param {String} ProblemClass the css class name for problem area.
* @param {String} DescClass the css class name for description area.
* @param {String} ChoicesClass the css class name for choices area.
* @param {String} LeftPageId the id of the left page.
* @param {String} RightPageId the id of the right page.
* @author ExSystem<exsystemchina@gmail.com>
*/
function TTestPaperProcessor(PaperOlId, ProblemClass, DescClass, ChoicesClass, LeftPageId, RightPageId) {
this.FPaperOlId = PaperOlId;
this.FProblemClass = ProblemClass;
this.FDescClass = DescClass;