Created
August 24, 2017 14:13
-
-
Save likev/5835d83055c5dfb3298aec509f83f8ab to your computer and use it in GitHub Desktop.
http://zjxy.ghlearning.com question
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//POST http://zjxy.ghlearning.com/Study/Learning/Question?medId=6cbb298a4b66420db03ab87968c05e98&sscId=d2eb90a25495499f90895893fd7af434 | |
//timespan=-3600 | |
<script type="text/javascript"> | |
function CloseAlertDialog(btn) | |
{ | |
var length = 0; | |
var isCorrect = true; | |
//茅陋艗猫炉聛忙藴炉氓聬娄莽颅鈥澝┞⑺? | |
$("input[name='radio_Chocie']").each(function () | |
{ | |
if ($(this).attr("checked") == true) | |
{ | |
length++; | |
} | |
}); | |
if (length == 0) | |
{ | |
$.alert("猫炉路茅鈧€懊︹€孤┟€澝β∷?); | |
return; | |
} | |
//忙拢鈧β碘€姑λ溌ヂ惵γ€澝ヂ? | |
var Txt = ""; | |
$("input[name='radio_Chocie']").each(function () | |
{ | |
if ($(this).attr("checked").toString().toUpperCase() != $(this).attr("qs").toUpperCase()) | |
{ | |
isCorrect = false; | |
} | |
if ($(this).attr("checked") == true) | |
{ | |
Txt += $("#" + $(this).attr("labelId") ).html() + " , "; | |
} | |
}); | |
//氓鈥犫劉氓鈥βッ€澝β∷? | |
$("#Record_Answer").val(Txt); | |
//氓鈥号久€澝λ溌ヂ惵γβC÷? | |
if(isCorrect) | |
{ | |
$("#Record_Result").val(1); | |
}else | |
{ | |
$("#Record_Result").val(0); | |
} | |
//错误 显示错误 然后返回 | |
if (isCorrect == false){AlertError();return;} | |
//正确就提交 | |
$.blockUI(); | |
$("#QuestionForm").submit(); | |
//http://zjxy.ghlearning.com/Study/Learning/DoQuestion?Length=8 | |
//POST /Study/Learning/DoQuestion?Length=8 HTTP/1.1 | |
//Record.CreId=&Record.CreateTime=0001%2F1%2F1+0%3A00%3A00&Record.MedId=&Record.QstId=-1&Record.TimePoint=0&Record.TrnId=&Record.Answer=A%0A++++++++++++++++++++54+%2C+&Record.Result=1&SscId=&X-Requested-With=XMLHttpRequest | |
//{"State":1,"StateType":1,"Value":null,"Error":""} | |
} | |
function AlertError() | |
{ | |
return lhgdialog({ | |
title: '忙聫聬莽陇潞', | |
id: 'Alert', | |
icon: "error.gif", | |
fixed: true, | |
lock: true, | |
content: "<span style='line-height:22px;'>盲陆聽莽颅鈥澝┾€濃劉盲潞鈥犆寂捗访宦宦ぢ脚撁€?br/></span>", | |
ok: true, | |
resize: false | |
}); | |
} | |
//忙聫聬盲潞陇氓庐艗忙藛聬盲禄楼氓聬沤 | |
function QuestionFormSuccess(obj) | |
{ | |
$.unblockUI(); | |
if (obj.State == 1) | |
{ | |
getCurrentDialog($("#but_Question")).close(); | |
} | |
else | |
{ | |
getCurrentDialog($("#but_Question")).close(); | |
} | |
} | |
</script> | |
<script> | |
(function(){ | |
var interV = window.setInterval( function(){ | |
var jqInput = $('div.ui_content input[qs="True"]'); | |
if(jqInput.length){ | |
jqInput.click(); | |
$('#but_Question').click(); | |
} | |
}, 10*1000); | |
})() | |
</script> | |
table.ui_border td.ui_c div.ui_inner table.ui_dialog td.ui_main div.ui_content | |
<div style="width: 500px; padding-bottom: 10px;"> | |
<span style="font-size:16px;font-weight:bold">[氓聧鈥⒚┾偓鈥癩猫炉路猫庐隆莽庐鈥斆寂?7+27=?</span> | |
<ul style="padding-top: 10px;"> | |
<li style=" padding:2px;font-size:16px;"> | |
<label> | |
<input type="radio" style=" border:0" name="radio_Chocie" id="radio_A" labelId="divradio_A" qs="True"/> | |
<span id="divradio_A">A | |
54</span> </label> | |
</li> | |
<li style=" padding:2px;font-size:16px;"> | |
<label> | |
<input type="radio" style=" border:0" name="radio_Chocie" id="radio_B" labelId="divradio_B" qs="False"/> | |
<span id="divradio_B">B | |
86</span> </label> | |
</li> | |
<li style=" padding:2px;font-size:16px;"> | |
<label> | |
<input type="radio" style=" border:0" name="radio_Chocie" id="radio_C" labelId="divradio_C" qs="False"/> | |
<span id="divradio_C">C | |
190</span> </label> | |
</li> | |
</ul> | |
</div> | |
<form Id="QuestionForm" action="/Study/Learning/DoQuestion?Length=8" data-ajax="true" data-ajax-success="QuestionFormSuccess" id="form0" method="post"> | |
<input id="Record_CreId" name="Record.CreId" type="hidden" value="" /> | |
<input data-val="true" data-val-required=" 盲赂聧猫茠陆盲赂潞莽漏潞" id="Record_CreateTime" name="Record.CreateTime" type="hidden" value="0001/1/1 0:00:00" /> | |
<input id="Record_MedId" name="Record.MedId" type="hidden" value="" /> | |
<input id="Record_QstId" name="Record.QstId" type="hidden" value="-1" /> | |
<input data-val="true" data-val-number="氓颅鈥斆β?TimePoint 氓驴鈥γ┞÷幻λ溌ぢ糕偓盲赂陋忙鈥⒙懊ヂ€斆b偓鈥? data-val-required=" 盲赂聧猫茠陆盲赂潞莽漏潞" id="Record_TimePoint" name="Record.TimePoint" type="hidden" value="0" /> | |
<input id="Record_TrnId" name="Record.TrnId" type="hidden" value="" /> | |
<input id="Record_Answer" name="Record.Answer" type="hidden" value="" /> | |
<input data-val="true" data-val-required=" 盲赂聧猫茠陆盲赂潞莽漏潞" id="Record_Result" name="Record.Result" type="hidden" value="Wrong" /> | |
<input id="SscId" name="SscId" type="hidden" value="" /> | |
</form> | |
<input type="button" class="button" id="but_Question" value="莽隆庐 氓庐拧" onclick="CloseAlertDialog(this);" /> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment