window.sidebar.addPanel(sTitle, sURL, "");} catch (e){alert("加入收藏失败,请使用Ctrl+D进行添加");} } } $(function() { $("#EditSubmit").removeAttr("disabled"); $("#EditSubmit").bind("click", function() { if ($("#title").val()== "") { alert('请输入帖子标题'); $("#title").focus(); return false } var constr=$("#ccooeditor").val(); //去掉空格 constr=constr.replace(/\r/g, ""); constr=constr.replace(/\n/g, ""); constr=constr.replace(/\s/g, ""); if (constr== "" || constr.length < 2) { $.dialog.alert('内容不能小于2个字符'); editor.focus(); return false } if ($("#ccooeditor").val()== "" || $("#ccooeditor").val().length > 60000) { alert('内容不能大于60000个字符'); editor.focus(); return false } var title="温馨提示"; var html="
"; showdialog(title, html, "340px"); $('#form').ajaxSubmit(function(data) { if (data) { var arrRs=eval("(" + unescape(data) + ")"); if (arrRs.status== "1") { apiclose(); if (arrRs.Msg== "") { setTimeout("window.parent.location.href='" + arrRs.Url + "'", 1000); } else { setTimeout("window.parent.location.href='error.asp?code=27'", 1000); } if (arrRs.xmlcode== 0) { $.dialog.tips(arrRs.message, 3, "success.gif"); } else { var msg='帖子发布成功'; if (arrRs.integral > 0) { msg += ',成长值: