1、JS部分代码
/**
* 提交表单
*/
function submitForm(action, actName, objName, formName,blogType){
$("#"+formName).attr("action",action);
//var f = document.getElementsByTagName("form")[0];
//alert(f.action);
$("#"+formName).form({
onSubmit:function(){
checkInput();//检查输入项是否为空
} ,
success:function(data){
if (data == "success"){
$.messager.alert('提示','
日志发表成功!','info');
}else{
$.messager.alert('提示','
日志发表失败!','warning');
}
}
});
}
/**
* 发表日志
*/
function publishBlog() {
submitForm("http://localhost:8090/webplus3/_web/sns/createBlog.do?_p=YXM9Mw__","发表","日志","fm1","publish");
}
2、html部分
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn