code cho ae nao chua danh gia mon hoc nha : var max = 5; var - TopicsExpress



          

code cho ae nao chua danh gia mon hoc nha : var max = 5; var min = 3; $(.question-rankings td:nth-child(3)).each(function() {$(this).find(input:radio).eq(Math.floor(Math.random()*(max-min+1)+min)-1).attr(checked, true);});$(.question-answers).each(function() {$(this).find(li).eq(Math.floor(Math.random()*(max-min+1)+min)).find(input:radio).attr(checked, true);});$(.question-answers).each(function() {$(this).find(li).eq(Math.floor(Math.random()*(max-min+1)+min)-2).find(input:radio).attr(checked, true);}); ketQuaDG.infopleted = 1; ketQuaDG.info.currentSectionIdx = 0; ketQuaDG.details = new Array(); $(#formSurvey input[type=radio]:checked).each(function (idx, radio) {var ids = $(this).attr(id).split(_); ketQuaDG.details.push({ questionId: ids[0], answerId: ids[1], comment: , type: radio }); }); $(#formSurvey input[type=checkbox]:checked).each(function (idx, check) { var ids = $(this).attr(id).split(_); ketQuaDG.details.push({ questionId: ids[0], answerId: ids[1], comment: , type: checkbox }) }); $(#formSurvey textarea).each(function (idx, text) { if ($(this).val() != ) { ketQuaDG.details.push({ questionId: $(this).attr(id), answerId: 0, comment: $(this).val(), type: comment }); } }); var times = 0; var xhr = function() {$.ajax({ type: POST, url: Modules/DGDanhGia/HandlerDGDanhGia.ashx?method=saveSurvey, data: JSON.stringify(ketQuaDG), contentType: application/json; charset=utf-8, dataType: json, cache: false, async: true, success: function (result) { if (result.code == 1) { $(.survey-thanks).show(); ob_ShowMessage(Ban dã dánh giá thành công., 1); $(#btnSave, #btnPrevSection, #btnNextSection).hide(); alert(Done!);} else { times++; $(.survey-thanks).show(); ob_ShowMessage(Thu lai lan thu: + times, 1); xhr();} }, error: function () { ob_ShowMessage(Có loi xay ra. Vui lòng thu lai., 3); window.scrollTo(0, 0); $(#btnNextSection, #btnSave).removeAttr(disabled); } }); }; xhr();
Posted on: Sun, 13 Jul 2014 15:29:22 +0000

Trending Topics



Recently Viewed Topics




© 2015