$("#finished_button").click(function(){
  var ketangid = $("#detail_form").find("input[name='ketangid']").val();
  var isrushed = $("#detail_form").find("input[name='isrushed']:checked").length;
  if(isrushed==0){
    $.toast("请选择提问方式"); return false;
  }
  var hascontent = $('#editor_cont').val();
  if(hascontent==""){
    $.toast("请填写题目内容"); return false;
  }
  var hasanswer = $('#editor_answer').val();
  if(hasanswer==""){
    $.toast("请填写题目答案"); return false;
  }
  $.ajax({
    url: '/glketang/pptaskadd5/basicok', 
    type: 'POST',
    dataType: 'json',
    data: $("#detail_form").serialize(),
    beforeSend: function(){
      $.showIndicator();
    },
    success: function(data){
      if(data.code=="success"){
        $.toast("保存成功");
        setTimeout(function(){parent.window.location.reload();}, 2000);
      }else{
        $.toast(data.msg);
      }
    },
    error: function(){
      $.toast("系统错误，请联系管理员");
    },
    complete: function(){
      $.hideIndicator();
    }
  });
  return false;
});