您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

section_2.js 1.1KB

12345678910111213141516171819202122232425262728293031323334
  1. $(function() {
  2. // outerHeight(true) 高度为 height+margin+padding+border
  3. var parameter = $(".section_2_html_root").data("page-params");
  4. console.log("section_2:parameter", parameter);
  5. var sectionsHtmlArr = [
  6. "section_2_class_all",
  7. "section_2_class_single",
  8. "section_2_level",
  9. "section_2_part",
  10. "section_2_lin_rank",
  11. "section_2_lin_score",
  12. "section_2_excellent"
  13. ];
  14. $(".score_analysis_root").html(sectionsHtmlArr.map(function (htmlName) {
  15. return "<div class='" + htmlName + "_html_root'></div>";
  16. }).join(""));
  17. sectionsHtmlArr.forEach(function(htmlName) {
  18. if (htmlName === "preface") {
  19. $("." + htmlName + "_html_root").data("page-params", JSON.stringify({
  20. htmlName: htmlName,
  21. subjectname: "语文",
  22. num: 12
  23. }));
  24. } else if (htmlName === "section_1") {
  25. $("." + htmlName + "_html_root").data("page-params", JSON.stringify({
  26. htmlName: htmlName,
  27. subjectname: "数学",
  28. num: 33
  29. }));
  30. }
  31. $("." + htmlName + "_html_root").load("./sections/scoreAnalysis/" + htmlName + ".html");
  32. });
  33. });