论坛编辑帖 的bug
This commit is contained in:
parent
04ba73fb7a
commit
ea6c4b09fe
|
@ -2,7 +2,7 @@
|
|||
<script>
|
||||
|
||||
function check_and_submit(){
|
||||
if($("textarea[name='memo[subject]']").val().trim() != "" && memo_content.html().trim() != "" ){
|
||||
if($("textarea[name='memo[subject]']").val().trim() != "" && !memo_content.isEmpty() ){
|
||||
if($("textarea[name='memo[subject]']").val().trim().length > 50 ){
|
||||
$("#error").html('主题不能超过50个字符').show();
|
||||
return;
|
||||
|
@ -13,11 +13,11 @@
|
|||
// }
|
||||
memo_content.sync();
|
||||
$("#edit_memo").submit();
|
||||
}else if($("textarea[name='memo[subject]']").val().trim() == "" && memo_content.html().trim() != "" ){
|
||||
}else if($("textarea[name='memo[subject]']").val().trim() == "" && !memo_content.isEmpty() ){
|
||||
$("#error").html("主题不能为空").show();
|
||||
}else if($("textarea[name='memo[subject]']").val().trim() != "" && memo_content.html().trim() == ""){
|
||||
}else if($("textarea[name='memo[subject]']").val().trim() != "" && memo_content.isEmpty()){
|
||||
$("#error").html("内容不能为空").show();
|
||||
}else if($("textarea[name='memo[subject]']").val().trim() == "" && memo_content.html().trim() == ""){
|
||||
}else if($("textarea[name='memo[subject]']").val().trim() == "" && memo_content.isEmpty()){
|
||||
$("#error").html("主题和内容不能为空").show();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue