1.页面引用.

jquery,easyui,主题easyui.css,图标ico.css,语言zh_CN.js

<script src="Scripts/jquery-easyui-1.3.2/jquery-1.8.0.min.js"></script>
    <script src="Scripts/jquery-easyui-1.3.2/jquery.easyui.min.js"></script>
    <link href="Scripts/jquery-easyui-1.3.2/themes/default/easyui.css" rel="stylesheet" />
    <link href="Scripts/jquery-easyui-1.3.2/themes/icon.css" rel="stylesheet" />
    <script src="Scripts/jquery-easyui-1.3.2/locale/easyui-lang-zh_CN.js"></script>

2.parser组件panel组件

<body>
    <div id="p" class="easyui-panel" title="My Panel"
style="width: 500px; height: 150px; padding: 10px; background: #fafafa;"
data-options="iconCls:'icon-save',closable:true,   
                collapsible:true,minimizable:true,maximizable:true">
        <p>panel content.</p>
        <p>panel content.</p>
    </div>
    <input type="button" name="" onclick="$('#p').panel('open')" value="显示" />
    <input type="button" name="" onclick="$('#p').panel('close')" value="关闭" />
    <input type="button" name="" onclick="$('#p').panel('destroy')" value="销毁" />
</body>


3.Form表单的验证(validate)提交

隐藏行号 复制代码 ? index.html
  1. <!DOCTYPE html>
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4.     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  5.     <title></title>
  6.     <script src="Scripts/jquery-easyui-1.3.2/jquery-1.8.0.min.js"></script>
  7.     <script src="Scripts/jquery-easyui-1.3.2/jquery.easyui.min.js"></script>
  8.     <link href="Scripts/jquery-easyui-1.3.2/themes/default/easyui.css" rel="stylesheet" />
  9.     <link href="Scripts/jquery-easyui-1.3.2/themes/icon.css" rel="stylesheet" />
  10.     <script src="Scripts/jquery-easyui-1.3.2/locale/easyui-lang-zh_CN.js"></script>
  11.     <script type="text/javascript">
  12.         var LoginAndRegDialog;
  13. var LoginInputForm;
  14.         $(function () {
  15. //对话框dialog
  16. LoginAndRegDialog = $("#LoginAndRegDialog").dialog({
  17.                 closable: false,
  18.                 modal: true,
  19.                 buttons: [{
  20.                     text: '登录',
  21.                     iconCls: 'icon-ok',
  22.                     handler: function () {
  23. //***先验证(根据自己的需求)
  24. if (LoginInputForm.form('validate')) {
  25. //表单form提交
  26. LoginInputForm.submit();
  27.                         }
  28.                     }
  29.                 }, {
  30.                     text: '取消',
  31.                     handler: function () {
  32.                         $('#LoginInputForm').form('clear');
  33.                     }
  34.                 }]
  35.             });
  36. //表单的提交要求
  37. LoginInputForm = $('#LoginInputForm').form({
  38.                 url: '/Login.ashx',
  39.                 onSubmit: function () {
  40. // do some check   
  41.                     // return false to prevent submit;   
  42. },
  43.                 success: function (data) {
  44. //alert(data);
  45. console.info(data);
  46.                     $.messager.show({
  47.                         title: '提示',
  48.                         msg: data
  49.                     })
  50.                 },
  51.             });
  52.         })
  53. </script>
  54. </head>
  55. <body>
  56.     <div id="LoginAndRegDialog" title="用户登录" style="width: 250px; height: 200px;">
  57.         <form id="LoginInputForm" method="post">
  58.             <table style="margin-top: 20px">
  59.                 <tr>
  60.                     <th>用户名:</th>
  61.                     <td>
  62. <!--直接使用验证规则class="easyui-validatebox"-->
  63. <input name="name" class="easyui-validatebox" data-options="required:true" />
  64.                     </td>
  65.                 </tr>
  66.                 <tr>
  67.                     <th align="right">密码:</th>
  68.                     <td>
  69.                         <input name="password" type="password" />
  70.                     </td>
  71.                 </tr>
  72.             </table>
  73.         </form>
  74.     </div>
  75. </body>
  76. </html>

隐藏行号 复制代码 ? Login.ashx
  1. public void ProcessRequest(HttpContext context)
  2.         {
  3.             context.Response.ContentType = "text/html";
  4. string username = context.Request["name"];
  5. string password = context.Request["password"];
  6.             context.Response.Write(username + "你好,你的密码是:" + password);
  7.         }

jQuery EasyUI 1.3 中文帮助手册

easyUI1.3.chm.7z

EasyUi – 1.入门的更多相关文章

  1. EasyUI基础入门之Pagination(分页)

    前言 对于一些企业级的应用来说(非站点),页面上最为基本的内容也就是表格和form了.对于类似于ERP这类系统来说数据记录比較大,前端表格展示的时候必需得实现分页功能了.恰巧EasyUI就提供了分页组 ...

  2. EasyUI基础入门之Parser(解析器)

    前言 JQuery EasyUI提供的组件包含功能强大的DataGrid,TreeGrid.面板.下拉组合等.用户能够组合使用这些组件,也能够单独使用当中一个.(使用的形式是以插件的方式提供的) Ea ...

  3. EasyUI基础入门之Easyloader(载入器)

    在了解完easyui的parser(解析器)之后,接下来就是easyloader(简单载入器)的学习了. 什么是EasyLoader 正如其名字一样easyloader的作用是为了动态的载入组件所需的 ...

  4. jQuery UI 之 EasyUI 快速入门

    jQuery EasyUI 基础 转载自(http://www.shouce.ren/api/view/a/3350) jQuery EasyUI 是一个基于 jQuery 的框架,集成了各种用户界面 ...

  5. EasyUI基础入门之Resiable(可缩放)

    easyui的base插件学习已经进行到Resizable(可缩放)了.照旧看看easyui官网的API. Resiable 正如其字面意思一样(可伸缩),resiable主要是将一些html元素扩展 ...

  6. EasyUI之Hello world(EasyUI的入门学习)

    1:创建一个动态web工程:    去官网http://www.jeasyui.net/download/下载官网文档    我去官网下载的最新版本,个人根据自己的需求下载即可.2:在webConte ...

  7. easyUI基础入门

    头部需要引人文件:<!DOCTYPE html><html><head> <meta charset="utf-8"> <ti ...

  8. EasyUi – 1.入门

    1.页面引用. jquery,easyui,主题easyui.css,图标ico.css,语言zh_CN.js <script src="Scripts/jquery-easyui-1 ...

  9. EasyUI基础入门之Droppable(可投掷)

    怎么说呢Droppable这个单词究竟是什么意思,准确来说easyui作者究竟要表达什么意思,还是不大好拿捏的.只是没关系,没有必要纠结与这些细枝末节的东西,依据官网的demo效果,就简单的将之定义为 ...

随机推荐

  1. HTTP状态码(响应码)

    HTTP状态码(响应码)用来表明HTTP请求是否已经成功完成.HTTP响应类型一共分五大类:消息响应,成功响应,重定向,客户端错误,服务器端错误. 下表列出了所有HTTP状态码,以及他们各自所代表的含 ...

  2. 取数据的前N行

    用awk中csv文件中取前1000行出来,代码虽少,很容易出错 BEGIN{ FS=","; OFS=","; i=; } { i++; )exit; prin ...

  3. PHP 中的行为 ,与什么是切面

    行为(Behavior)扩展以及插件(Plug or Hook)详解: 行为(Behavior)是ThinkPHP扩展机制中比较关键的一项扩展,行为即可以独立调用,也可以绑定到某个 标签中进行监听,官 ...

  4. 文本比较算法三——SUNDAY 算法

    SUNDAY 算法描述: 字符串查找算法中,最著名的两个是KMP算法(Knuth-Morris-Pratt)和BM算法(Boyer-Moore).两个算法在最坏情况下均具有线性的查找时间.但是在实用上 ...

  5. 1.AngularJS初探

    1.需要什么前端开发环境 1)代码编辑工具 webstorm 2)断点调试工具 chrome插件Batarang 3)版本管理 tortoiseGit 4)代码合并和混淆工具 grunt-contri ...

  6. SQL Sever2008r2 数据库服务各种无法启动的解决办法

    一.Sql Server服务远程过程调用失败解决 以前出现过这个问题,那时候是因为把实例安装在了D盘,后来D盘被格式化了.然后,这些就没了.今天早上打开电脑,竟然又出现这个问题,可是Server200 ...

  7. [mysql]max_allowed_packet ,centos

    在通过脚本向mysql写入大量测试数据时,出现这个问题,记录下: https://dev.mysql.com/doc/refman/5.5/en/packet-too-large.html 修改/et ...

  8. 《oracle每日一练》Oracle DBLink连接数过多的问题(Ora-02020)

    本文转自Oracle DBLink连接数过多的问题(Ora-02020) 今天在处理资料同步问题,需要将其它几个DB Server的资料同步到一个目地资料库,采用的方式是:DBLink+Job ,然而 ...

  9. Print Common Nodes in Two Binary Search Trees

    Given two Binary Search Trees, find common nodes in them. In other words, find intersection of two B ...

  10. android打电话的小程序

    主要使用了Intent以及uses-permission标签. call.rar 下载后直接导入项目