from 表单提交
html端代码
<body>
<div id="dlg" class="easyui-panel" buttons="#dlg-buttons">
<form id="saveHistory" method="post">
<!-- <table class="edittable" >
<tr>
<td width="20%"><span key="file.filename" class="paltform-i18n">原文件或文件夹路径:</span></td>
<td width="80%">
<input type="text" id="localPath" name='localPath' required="true" style="width: 525px" panelHeight="80px" class="easyui-validatebox input_bg">
<!-- </td>
</tr>
<tr>
<td width="20%"><span key="file.filename" class="paltform-i18n">文档类别:</span></td>
<td width="80%">
<select id ="foldreeventid" name="foldreeventid" required="true" class="easyui-combotree" style="width: 530px" panelHeight="80px" onclick="queryTree()"></select>
</td>
</tr>
</table> -->
<div style="margin-top: 10px;text-align: center;">
<span key="file.filename" class="paltform-i18n">原文件或文件夹路径:</span>
<input type="text" id="localPath" name='localPath' required="true" style="width: 525px" panelHeight="80px" class="easyui-validatebox input_bg">
</div>
<div style="margin-top: 10px">
<span class="uploadpage_textStyle" > 文档分类:</span>
<input type="text" id="fileclassify1" name="fileclassify1" validType="fileclassify1" style="width:200px;" required="true" class="easyui-combotree input_bg" missingmessage="文档分类不能为空" panelHeight="180px"/>
<input type="text" id="fileclassify" name='fileclassify' validType="fileclassify" style="width: 200px;" required="true" class="easyui-combotree input_bg" missingmessage="文档分类不能为空" panelHeight="180px"/>
</div>
<br/>
<div>
温馨提示:<br/><br/>
1.导入文件夹路径下的文件不宜太多,如果文件太多,可以分多次导入<br/><br/>
</div>
<div class="button_area_absolute">
<table width="100%">
<tr>
<td align="center">
<!-- <a href="#" class="easyui-linkbutton" iconCls="icon-ok" onclick="confirmMigration()"><span key="unit.save" class="paltform-i18n">迁移文件</span></a>
<a href="#" class="easyui-linkbutton" iconCls="icon-ok" onclick="modifyFileName()"><span key="unit.save" class="paltform-i18n">修改文件名称</span></a>
<a href="#" class="easyui-linkbutton" iconCls="icon-ok" onclick="saveFileToDatabase()"><span key="unit.save" class="paltform-i18n">保存文件信息至数据库</span></a>
<a href="#" class="easyui-linkbutton" iconCls="icon-ok" onclick="generateProfileAttribute()"><span key="unit.save" class="paltform-i18n">生成摘要属性</span></a>
<a href="#" class="easyui-linkbutton" iconCls="icon-ok" onclick="addWaterPrint()"><span key="unit.save" class="paltform-i18n">添加水印</span></a>
<a href="#" class="easyui-linkbutton" iconCls="icon-ok" onclick="generatePreview()"><span key="unit.save" class="paltform-i18n">生成预览</span></a> -->
<a href="#" class="easyui-linkbutton" iconCls="icon-ok" onclick="documentImport()"><span key="unit.save" class="paltform-i18n">一键导入</span></a>
<a href="#" class="easyui-linkbutton" iconCls="icon-cancel" onclick="cancelMigration()"><span key="unit.cancel" class="paltform-i18n">取消</span></a>
</td>
</tr>
</table>
</div>
</form> </div>
</body>
JS端代码
1 $('#saveHistory').form('submit', {
url : "../doccenter/documentImport.do",
dataType : "json",
onSubmit : function() {
if(!($(this).form('validate'))){
hiddenLoadingMessage();
}
return $(this).form('validate');
},
// var localPath=$('#localPath').val();
// var fileclassify1=$('#fileclassify1').combotree('getValue');
// var fileclassify=$("#fileclassify").combotree('getValue');
// $.ajax({
// url: "../doccenter/documentImport.do",
// data:{"localPath":localPath,"fileclassify1":fileclassify1,"fileclassify":fileclassify},
// type:'post',
// dataType : "json",
success : function(result) {
hiddenLoadingMessage();
var result = eval('(' + result + ')');
if (result.success){
$.messager.confirm("提示", result.msg+"。是否继续导入文档?", function(f){
if(f){
$('#localPath').attr("value","");
$("#foldreeventid").combotree("setValue","");
}else{
reloadData('queryFolder.htm', 'dg');
cancelMigration();
}
reloadData('queryFolder.htm', 'dg');
}); } else {
$.messager.alert('错误',result.msg,result.error);
}
}
});
from 表单提交的更多相关文章
- from表单提交数据之后,后台对象接受不到值
如果SSH框架下,前段页面通过from表单提交数据之后,在后台对象显示空值,也就是接收不到值得情况下.首先保证前段输入框有值,这个可以在提交的时候用jQuery的id或者name选择器alert弹出测 ...
- 不使用Ajax,如何实现表单提交不刷新页面
不使用Ajax,如何实现表单提交不刷新页面? 目前,我想到的是使用<iframe>,如果有其他的方式,后续再补. 举个栗子: 在表单上传文件的时候必须设置enctype="mul ...
- golang-web框架revel一个表单提交的总结
这里要介绍好是revel框架的表单post提交的列子,主要是用于入门学习,和一些知识点的讲解: 首先: 来了解一个问题那就是重复提交表单,做过form表单提交的同学都知道,如果表单提交后不做处理,那么 ...
- 关于我们经常用到的form表单提交
工作中遇到了太多太多的表单提交问题,曾经学过一个HTML的表单提交给 另外一个HTML页面,对于后台怎么获取有点想不起来了. 今天便做了几个实验,提交订单到后台,来掩饰后台如何接受表单内容: 实验 一 ...
- 天河微信小程序入门《四》:融会贯通,form表单提交数据库
天河在阔别了十几天之后终于又回来了.其实这篇文章里的demo是接着(天河微信小程序入门<三>)后面就做了的,但是因为最近在做别的项目,所以就偷懒没有发出来.放到今天来看,从前台提交数据到数 ...
- html表单提交方式
xml 表单提交方式: * 使用submit提交 <form> 要提交的数据 <input type="submit" /'> </form> ...
- form表单提交问题
1.提交后不能跳转到指定页面 jsp代码 <form class="form-horizontal" role="form"> <p clas ...
- Java EE之servlet处理表单提交的请求
1.在源包下新建一个Servlet页,取名为LoginServlet: package weinidingServlet; //该Servlet所 ...
- MVC中处理表单提交的方式(Ajax+Jquery)
MVC中处理表单有很多种方法,这里说到第一种方式:Ajax+Jquery 先看下表单: <form class="row form-body form-horizontal m-t&q ...
- 使用RequireJs和Bootstrap模态框实现表单提交
下面我将使用requirejs结合模态框实现三五行代码部署表单提交操作. 传统开发思路如下:
随机推荐
- 《JavaScript高级程序设计》
第二章在html中使用Javascript2.1<script>在使用<script>嵌入JS代码时,不要再代码中的任何地方出现"</script>&qu ...
- Nsdate的各种常用操作
// // NVDate.h // // Created by Noval Agung Prayogo on 2/5/14. // Copyright (c) 2014 Noval Agung ...
- Python:Python 3.x 的革新
Python 3.x 版本在设计时为了向最好的语言前进,没有考虑向下兼容,许多针对早期 Python 版本设计的程序都无法正常运行.本文简单介绍了 Python 3.x 版本较之 2.x 版本语法上的 ...
- ErrorCode枚举类型返回错误码信息测试,手动抛出异常信息,在事务中根据错误码来回滚事务的思路。
ErrorCode.java 简单测试代码,具体应用思路:手动抛出异常信息,在事务中根据错误码来回滚事务的思路. public enum ErrorCode { //系统级 SUCCESS(" ...
- Linux性能检测命令 - vmstat
一.vmstat命令描述 最常见的Linux/Unix监控工具想必是vmstat了,vmstat是Virtual Meomory Statistics(虚拟内存统计)的缩写,可以展现给定时间间隔的服务 ...
- (1)搭建opencv-android环境
前言: 本文目的是指导在windows平台搭建一个opencv for android 的开发环境,作者参考了很多网上的教程,本文所使用的各种软件.插件都是截止到写这篇文章的最新版本,作者在实际搭建环 ...
- Android /data/data/app_file/目录下面安装apk无权限问题
当识别SDCard的时候 String filePath = null; String state = Environment.getExternalStorageState(); if (state ...
- JS之DOM编程
为什么学dom编程? 通过dom编程,我们可以写出各种网页游戏 dom编程也是我们学习ajax技术的基础,所以我们必需掌握好dom编程. dom编程简介 DOM=Document Object Mo ...
- Java集合框架(四)
Collections 集合框架的工具类 着重讲解以下方法: 1.sort(): 1º根据元素的自然顺序对指定列表按升序进行排序,列表中的所有元素都必须实现comparable接口. pu ...
- iphone 异常捕获处理
iphone 异常捕获处理 1 void UncaughtExceptionHandler(NSException *exception) { 2 NSArray *arr = [exception ...