课程问答区帖子的发送防止连续提交

cxt_course
cxt 9 years ago
parent 17497cd74e
commit 979598f334

@ -2,6 +2,7 @@
<%= import_ke(enable_at: true, prettify: false, init_activity: false) %>
<% end %>
<script type="text/javascript">
var first_click = true;
function nh_check_field(params){
var result=true;
if(!regexTopicSubject()) {
@ -49,10 +50,12 @@
contentmsg:params.contentmsg,
textarea:params.textarea
});
if(is_checked){
if(first_click && is_checked){
if(flag){
first_click = false;
return true;
}else{
first_click = false;
$(this)[0].submit();
return false;
}

Loading…
Cancel
Save