我目前正在HTML结果页中使用一些JavaScript。该代码检查返回的结果'studentscore'(来自QuizMaker 360),然后根据得分显示图像
courseSummary.appendChild(createElFromDef(config));
var phrase;
if(studentScore <= 10)
phrase = '<center><img style="width: 100%; height: 100%;" title="PieChart%" alt="PieChart" src="http://www.myfolder.co.uk/Images/ChartGraphics/Pie0-100.png"></center>';
else if(studentScore <= 20)
phrase = '<center><img style="width: 100%; height: 100%;" title="PieChart" alt="PieChart" src="http://www.myfolder.co.uk/Images/ChartGraphics/Pie10-90.png"></center>';
else if(studentScore <= 30)
phrase = '<center><img style="width: 100%; height: 100%;" title="PieChart" alt="PieChart" src="http://www.myfolder.co.uk/Images/ChartGraphics/Pie20-80.png"></center>';
else if(studentScore <= 40)
phrase = '<center><img style="width: 100%; height: 100%;" title="PieChart" alt="PieChart" src="http://www.myfolder.co.uk/Images/ChartGraphics/Pie30-70.png"></center>';
else if(studentScore <= 50)
phrase = '<center><img style="width: 100%; height: 100%;" title="PieChart" alt="PieChart" src="http://www.myfolder.co.uk/Images/ChartGraphics/Pie50-50.png"></center>';
else if(studentScore <= 60)
phrase = '<center><img style="width: 100%; height: 100%;" title="PieChart" alt="PieChart" src="http://www.myfolder.co.uk/Images/ChartGraphics/Pie60-40.png"></center>';
else if(studentScore <= 70)
phrase = '<center><img style="width: 100%; height: 100%;" title="PieChart" alt="PieChart" src="http://www.myfolder.co.uk/Images/ChartGraphics/Pie70-30.png"></center>';
else if(studentScore <= 80)
phrase = '<center><img style="width: 100%; height: 100%;" title="PieChart" alt="PieChart" src="http://www.myfolder.co.uk/Images/ChartGraphics/Pie80-20.png"></center>';
else if(studentScore <= 90)
phrase = '<center><img style="width: 100%; height: 100%;" title="PieChart" alt="PieChart" src="http://www.myfolder.co.uk/Images/ChartGraphics/Pie90-10.png"></center>';
else
phrase = '<center><img style="width: 100%; height: 100%;" title="PieChart" alt="PieChart" src="http://www.myfolder.co.uk/Images/ChartGraphics/Pie100-0.png"></center>';
/* config = {
elName: 'div',
text: phrase
};
我想根据结果修改代码以输出2张图像,但是我需要在它们之间进行分页。
例如 图片 分页符 图片
这可以用javascript完成吗?
欢迎提出任何想法。
非常感谢