Home > Web Front-end > JS Tutorial > body text

js part and html part submitted by form form action_javascript skills

WBOY
Release: 2016-05-16 17:05:05
Original
1665 people have browsed it
1. JS part code
Copy the code The code is as follows:

/ **
* Submit form
*/
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();//Check whether the input item is empty
},
success:function(data){
if (data == "success"){
$. messager.alert('prompt','
Log published successfully!','info');
}else{

$.messager.alert('prompt','}
}
});
}
/**
* Post a blog
*/
function publishBlog() {
submitForm("http://localhost:8090/webplus3/_web/sns/createBlog.do?_p=YXM9Mw__","Publish","Log","fm1","publish");
}

2. html part
Copy code The code is as follows:



title:



Content:




Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template