html 中的 js 的增删改查
function form_post_add() {
var testform = document.getElementById("add");
testform.action = "add";
testform.name = "age";
testform.name = "hoppy";
testform.method = "post";
testform.submit();
}
function form_get_delect() {
var r = window.confirm("是否要删除该用户!");
if(r) {
var testform = document.getElementById("delect");
testform.action = "delect";
testform.name = "id";
testform.method = "get";
testform.submit();
}
}
function form_post_delect(yId) {
var r = window.confirm("是否要删除该用户!");
if(r) {
var testform = document.getElementById("DELECT_method");
testform.action = "list/" + yId;
testform.name = "_method";
testform.method = "get";
testform.submit();
}
}
function form_post_update() {
var testform = document.getElementById("PUT_method");
testform.action = "add/";
testform.name = "age";
testform.name = "hoppy";
testform.method = "post";
testform.submit();
}
function form_file_upload() {
var r = window.confirm("此上传不会删除原来数据库的所有数据!确定上传???");
if(r) {
var testform = document.getElementById("file_upload");
testform.accept = "application/msexcel";
testform.action = "uploadFile";
testform.name = "file";
testform.enctype = "multipart/form-data";
testform.method = "post";
testform.submit();
}
}
function form_file_uploadAll() {
var r = window.confirm("此上传会删除原来数据库的所有数据!确定上传???");
if(r) {
var testform = document.getElementById("file_uploadAll");
testform.accept = "application/msexcel";
testform.action = "uploadFileAll";
testform.name = "file";
testform.enctype = "multipart/form-data";
testform.method = "post";
testform.submit();
}
}