DHTMLX-Form
DHTMLX-Form
dhtmlxForm提供了一个标准形式与一些有用的补充,如不同风格,使用的数据从客户端和服务器端,与其他dhtmlx组件的集成、验证等。
例子
<!DOCTYPE html>
<html>
<head>
<title>Web skin</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<link rel="stylesheet" type="text/css" href="../../../skins/web/dhtmlx.css"/>
<script src="../../../codebase/dhtmlx.js"></script>
<script>
var myForm, formData;
function doOnLoad() {
formData = [
{type: "settings", position: "label-right", labelWidth: "auto", inputWidth: 130},
{type: "label", label: "Web Skin"},
{type: "checkbox", label: "Sync data with FTP server", checked: true, list:[
{type: "settings", labelWidth: 90, inputWidth: 200, position: "label-left"},
{type: "input", name: "ftp_server", label: "Server", value: "ftp://backup.mydomain.com"},
{type: "input", name: "ftp_login", label: "Login", value: "user"},
{type: "password", name: "ftp_pwd", label: "Password", value: "password"},
{type: "select", name: "ftp_sync", label: "Sync every", options:[
{value: "day", text: "day"},
{value: "2ndday", text: "second day"},
{value: "friday", text: "friday"},
{value: "2ndfriday", text: "second friday", selected: true},
{value: "Month", text: "last friday in a month"}
]},
{type: "checkbox", name: "ftp_log", value: 1, label: "Enable log", checked: true}
]},
{type: "checkbox", label: "Init system hardware upgrade", offsetTop: 10, checked: true, list: [
//
{type: "settings", labelWidth: 90, inputWidth: 100, position: "label-left"},
{type: "calendar", label: "Start Date", name: "reminder", enableTime: false,
calendarPosition: "right", value:"2013-03-01" },
{type: "select", label: "Duration", options:[
{value: "day", text: "day"},
{value: "week", text: "week", selected: true},
{value: "2weeks", text: "two weeks"}
]}
]},
{type: "checkbox", label: "Use custom UI colors", checked: true, offsetTop: 10, list:[
{type: "settings", labelWidth: "auto", inputWidth: "auto"},
{type: "fieldset", label: "Font", inputWidth: 160, list: [
{type: "radio", name: "fontcolor", label: "Black", checked: true},
{type: "radio", name: "fontcolor", label: "Blue"},
{type: "radio", name: "fontcolor", label: "Green"}
]},
{type: "newcolumn"},
{type: "fieldset", label: "Background", inputWidth: 160, offsetLeft: 30, list:[
{type: "radio", name: "bgcolor", label: "White", checked: true},
{type: "radio", name: "bgcolor", label: "Yellow"},
{type: "radio", name: "bgcolor", label: "Gray"}
]}
]},
{type: "checkbox", label: "Custom font", checked: true, offsetTop: 10, list:[
{type: "combo", label: "", inputWidth: 120, options: [
{value: "tahoma", text: "Tahoma"},
{value: "arial", text: "Arial", selected: true},
{value: "verdana", text: "Verdana"}
]},
{type: "newcolumn"},
{type: "combo", label: "", inputWidth: 70, offsetLeft: 5, options: [
{value: "12", text: "12px"},
{value: "13", text: "13px"},
{value: "14", text: "14px", selected: true}
]}
]},
{type: "checkbox", label: "Upload new data", checked: true, offsetTop: 10, list:[
{type: "fieldset", label: "Files", inputWidth: 350, list:[
{type: "upload", name: "myFiles", inputWidth: 330,
url: "../07_uploader/php/dhtmlxform_item_upload.php", _swfLogs: "enabled",
swfPath: "../../../codebase/ext/uploader.swf",
swfUrl: "../../samples/07_uploader/php/dhtmlxform_item_upload.php"}
]}
]},
//
{type: "checkbox", label: "Yes! I'm sure to save changes", offsetTop: 10, checked: 1, list:[
//
{type: "button", value: "Save", offsetLeft: 50, offsetTop: 10, inputWidth: 50},
{type: "newcolumn"},
{type: "button", value: "Cancel", offsetLeft: 8, offsetTop: 10}
]}
];
myForm = new dhtmlXForm("myForm", formData);
myForm.setFocusOnFirstActive();
}
</script>
</head>
<body onload="doOnLoad();">
<div id="myForm"></div>
</body>
</html>
效果
DHTMLX-Form的更多相关文章
- DHTMLX 前端框架 建立你的一个应用程序 教程(九)--绑定表单Form到表格Grrid中
绑定表单Form到表格Grrid中 现在我们需要选中一行表格数据的时候 数据能在表单中显示出来 我们可以使用DHTMLX 丰富的组件功能实现它. 绑定表单到表格 1.调用bind方法将表单绑定到网格, ...
- DHTMLX 前端框架 建立你的一个应用程序 教程(八)-- 添加表单Form
添加表单Form 我们下一步是在页面中添加一个表单,表格中的选中字段将会显示在表单中.提供一个提交按钮 可以对显示的数据进行修改提交. 添加表单到布局单元格中 1.在右侧布局中使用attachForm ...
- 【开源】分享一个前后端分离方案-前端angularjs+requirejs+dhtmlx 后端asp.net webapi
一.前言 半年前左右折腾了一个前后端分离的架子,这几天才想起来翻出来分享给大家.关于前后端分离这个话题大家也谈了很久了,希望我这个实践能对大家有点点帮助,演示和源码都贴在后面. 二.技术架构 这两年a ...
- DHTMLX 前端框架 建立你的一个应用程序 教程(十一)--添加/删除表格中的记录
添加/删除表格中的记录 我们的最终功能是在表格中添加删除 我们通过单机工具栏上的按钮来实现添加删除 当我们单击添加按钮的时候, 表单中 第一行默认填写New contact 光标自动聚焦 当用户点击删 ...
- 前端JS开发框架-DHTMLX
一:介绍 dhtmlxSuite是一个JavaScript库,提供了一套完整的Ajax -驱动UI组件.我们能够使用dhtmlxSuite构建 简洁界面,快速性能,和丰富用户体验的企业级web应用程序 ...
- DHTMLX 前端框架 建立你的一个应用程序教程(二)--设置布局
Layout控件的演示 Dhtmlx有很多的组建来组织网页的建设, 这篇主要介绍dhtmlxLayout . 下面图片中 布局将各个组件(1.Menu 2.Toolbar 3.Grid 4.Form ...
- 2014-11-21 DHTMLX是什么
什么是dhtmlx? dhtmlx是一套网页开发 的函式库,他提供了树状元件.数据方格组件.工具列等组件供开发 人员使用. dhtmlx组件是一个JavaScript 库,提供了一套完整的Ajax驱动 ...
- 前端angularjs+requirejs+dhtmlx 后端asp.net webapi
享一个前后端分离方案源码-前端angularjs+requirejs+dhtmlx 后端asp.net webapi 一.前言 半年前左右折腾了一个前后端分离的架子,这几天才想起来翻出来分享给大家 ...
- form表单验证-Javascript
Form表单验证: js基础考试内容,form表单验证,正则表达式,blur事件,自动获取数组,以及css布局样式,动态清除等.完整代码如下: <!DOCTYPE html PUBLIC &qu ...
- Form 表单提交参数
今天因为要额外提交参数数组性的参数给form传到后台而苦恼了半天,结果发现,只需要在form表单对应的字段html空间中定义name = 后台参数名 的属性就ok了. 后台本来是只有模型参数的,但是后 ...
随机推荐
- DOS命令大全!
一)MD——建立子目录 1.功能:创建新的子目录 2.类型:内部命令 3.格式:MD[盘符:][路径名]〈子目录名〉 4.使用说明: (1)“盘符”:指定要建立子目录的磁盘驱动器字母,若省略,则为当前 ...
- <转>Win7系统下利用U盘安装Ubuntu_12.04实现双系统教程
目前网上流传的关于Linux 系统的安装教程可是说是五彩缤纷,之前想采用硬盘安装方式,由于配置问题未能正确安装,现研究了下U盘安装,根据互联网上的一些资料及自己的总结,在Windows7 系统下采用U ...
- iOS--UIView和UIWindow用法
基础 UI(user interface)是用户界面:iOS的应用是由各种各样的UI控件组成 UIWindow就是一个窗口,学的第一个基础类,就是一个容器,可以在容器上放不同的内容,每个app都需要借 ...
- 关于MySQL数据导出导入
工具 mysqlmysqldump 应用举例 导出 导出全库备份到本地的目录 mysqldump -u$USER -p$PASSWD -h127.0.0.1 -P3306 --routines --d ...
- Matlab中fread函数的高级使用方法及其帮助文档中容易引起歧义的地方
参考资料:http://cn.mathworks.com/help/matlab/ref/fread.html 注意:参考资料针对的Matlab版本号R2015a,我使用的是R2013b. Matla ...
- Android常用库
原文链接:http://www.jianshu.com/p/19368c2cdcaf 系统框架 1. 网络请求 Android Async HTTP Android异步HTTP库 AndroidAsy ...
- MySQL5.7.11安装
1.官网下载mysql-5.7.11-winx64.zip 2.将压缩包解压至D:\Program Files,配置环境变量
- linux 下调试 汇编
gcc: -c 编译后汇编,不连接 -S 编译后停止,不进行汇编 -o 编译,汇编,连接 -g 生成调试信息 -gstabs 标识符 main gdb break *标识符 :设置断点 info re ...
- Facebook 网络模拟工具 ATC部署及使用
废话引用: Facebook此前开源了增强网络流量控制工具 ATC,能利用WiFi网络模拟各种移动网络,测试智能手机和APP在不同国家地区和应用环境下的性能表现.ATC能够模拟2G.2.5G(Edge ...
- linux文件目录权限详解(20170101)
linux目录权限与文件权限是不同的,二者要相互配合,这是基础. 比如要读文件:目录至少要有x,文件至少要有r. 要写文件:目录至少要有x,文件至少要有rw. 要执行文件:目录至少要有x,文件至少要有 ...