布置作业时选择语言显示不正确

This commit is contained in:
sw 2015-09-19 16:23:47 +08:00
parent 38c542dff5
commit 2a8cf2885a
1 changed files with 8 additions and 1 deletions

View File

@ -145,7 +145,14 @@ $(function(){
test_numbers += 1; test_numbers += 1;
}); });
var language = $('select.language_type').val() == 1 ? 'C语言' : 'C++语言'; var language = '';
if($('select.language_type').val() == 1){
language = 'C';
}else if($('select.language_type').val() == 2){
language = 'C++';
}else if($('select.language_type').val() == 3){
language = 'Python';
}
if (valid) { if (valid) {
$("input[name=homework_type]").val(2); $("input[name=homework_type]").val(2);