| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title>传统听说课文</title>
- <meta charset="utf-8" />
- <script src="Scripts/jquery.js"></script>
- <link href="Common/tasklib_book.css" rel="stylesheet" type="text/css" />
- <script src="Common/tasklib_book.js"></script>
- </head>
- <body>
- <div class="scroll-view">
- <button id="load-text">加载传统听说课文</button>
- <button id="showhide-answer" data-status="1">隐藏习题答案</button>
- <button id="scroll-review">定位滚动数据</button>
- </div>
-
- <div id="data"></div>
- <script type="text/javascript">
- var answerjson = "";//作答信息
- var reviewjson = "";//评阅信息
- //加载数据
- window.onload = function () {
- //加载听说课文
- answerjson = $.ajax({ url: "TxtStr/ansdata.txt", async: false }).responseText;
- reviewjson = $.ajax({ url: "AnsText/anstext.txt", async: false }).responseText;
- }
- //加载传统听说课文
- $("#load-text").on("click", function () {
- var data = $.ajax({ url: "TxtStr/02.txt", async: false }).responseText;
- $("#data").html(data);
- bindEventYS();
- var ResInfo = {
- yaoshiShowImgUrl: "Images/yaoshi-show.png",
- yaoshiHideImgUrl: "Images/yaoshi-hide.png",
- KouYuTagImgUrl: "Images/KY.png",
- recordPlayImgUrl: "Images/play.png",
- recordPauseImgUrl: "Images/pause.png",
- audioPlayImgUrl: "Images/dynaiselaba.gif",
- audioPauseImgUrl: "Images/dynaiselaba.png"
- }
- //调用查看图标
- $.each($(".yaoshi"), function (index, item) {
- $(item).attr("src", ResInfo.yaoshiShowImgUrl);//移动端要根据本地 喇叭 路径替换
- });
- $.each($(".audioImg"), function (index, item) {
- $(item).attr("src", ResInfo.audioPauseImgUrl);//移动端要根据本地 喇叭 路径替换
- });
- $.each($(".oralLanguageImg"), function (index, item) {
- $(item).attr("src", ResInfo.KouYuTagImgUrl);//移动端要根据本地 喇叭 路径替换
- });
- });
- //显示/隐藏习题答案
- $("#showhide-answer").on("click", function () {
- if ($(this).data("status") == "0") {
- this.innerText = "隐藏习题答案";
- $(this).data("status", "1");
- //showHideAnswer(true);
- showHideAnswerEx(true, true);
- //$(".underlineContent").show();
- }
- else {
- this.innerText = "显示习题答案";
- $(this).data("status", "0");
- //showHideAnswer(false);
- showHideAnswerEx(true, false);
- //$(".underlineContent").hide();
- }
- });
- //定位滚动数据
- $("#scroll-review").on("click", function () {
- scrollAnswer("15");
- });
- </script>
- </body>
- </html>
|