1. Часть кода JS
Код кода копирования следующим образом:
/**
* Отправить форму
*/
Функция отправить форму (Action, ActName, ObjName, FormName, BlogType) {
$ ("#"+formname) .attr ("action", action);
// var f = document.getElementsbytagname ("form") [0];
// предупреждение (F.Action);
$ ("#"+formname) .form ({
onSubmit: function () {
CheckInput ();
},
Успех: function (data) {
if (data == "успех") {{
$ .Messager.alert ('rample', '<br> успешно журналы!', 'Info');
} Еще {
$ .Messager.alert ('tips', '<br> журналы не удались!', «Предупреждение»);
}
}
});
}
/**
* Опубликовал журнал
*/
fublishblog () {
Отправить форму ("http: // localhost: 8090/webplus3/_web/sns/createblog.do?
}
2. HTML Part
Код кода копирования следующим образом:
<Form style = "Padding: 10px 8px;" Method = "post" action = "id =" fm1 "name =" fm1 ">
<div style = "margin-bottom: 10px;">
<span style = "Право накладки: 10px;"> Название: </span>
<input type = "text" id = "title" name = "blog.tital" maxlength = "30">
</div>
<div style = "margin-bottom: 10px;">
<span style = "Право накладки: 10px;"> Содержание: </span>
<input type = "text" id = "content" name = "blog.content" maxlength = "3000">
</div>
<Button type = "отправить" id = "saveBlogbutton" onclick = "publicblog ()">
<pran> опубликовал </span>
</Button>
</form>