http://www.cnblogs.com/tangge/p/3214496.html

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.             //表单的提交要求
  38.             LoginInputForm = $('#LoginInputForm').form({
  39.                 url: '/Login.ashx',
  40.                 onSubmit: function () {
  41.                     // do some check   
  42.                     // return false to prevent submit;   
  43.                 },
  44.                 success: function (data) {
  45.                     //alert(data);
  46.                     console.info(data);
  47.                     $.messager.show({
  48.                         title: '提示',
  49.                         msg: data
  50.                     })
  51.                 },
  52.             });
  53.         })
  54.     </script>
  55. </head>
  56. <body>
  57.     <div id="LoginAndRegDialog" title="用户登录" style="width: 250px; height: 200px;">
  58.         <form id="LoginInputForm" method="post">
  59.             <table style="margin-top: 20px">
  60.                 <tr>
  61.                     <th>用户名:</th>
  62.                     <td>
  63.                         <!--直接使用验证规则class="easyui-validatebox"-->
  64.                         <input name="name" class="easyui-validatebox" data-options="required:true" />
  65.                     </td>
  66.                 </tr>
  67.                 <tr>
  68.                     <th align="right">密码:</th>
  69.                     <td>
  70.                         <input name="password" type="password" />
  71.                     </td>
  72.                 </tr>
  73.             </table>
  74.         </form>
  75.     </div>
  76. </body>
  77. </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.            
  8.         }

jQuery EasyUI 1.3 中文帮助手册

easyUI1.3.chm.7z

easyui 入门的更多相关文章

  1. EasyUI学习(一)——EasyUI入门

    EasyUI学习总结(一)——EasyUI入门 一.EasyUI下载 EasyUI官方下载地址:http://www.jeasyui.com/download/index.php,目前最新的版本是:j ...

  2. EasyUI学习总结(一)——EasyUI入门

    一.EasyUI下载 EasyUI官方下载地址:http://www.jeasyui.com/download/index.php,目前最新的版本是:jQuery EasyUI 1.4.1

  3. Easyui入门视频教程 第11集---Window的使用

    目录 Easyui入门视频教程 第11集---Window的使用   Easyui入门视频教程 第10集---Messager的使用  Easyui入门视频教程 第09集---登录完善 图标自定义   ...

  4. Easyui入门视频教程 第10集---Messager的使用

    Easyui入门视频教程 第10集---Messager的使用 <script type="text/javascript"> function show(){ $.m ...

  5. Easyui入门视频教程 第09集---登录完善 图标自定义

    目录 ----------------------- Easyui入门视频教程 第09集---登录完善 图标自定义   Easyui入门视频教程 第08集---登录实现 ajax button的使用  ...

  6. Easyui入门视频教程 第08集---登录实现 ajax button的使用

    目录 ----------------------- Easyui入门视频教程 第09集---登录完善 图标自定义   Easyui入门视频教程 第08集---登录实现 ajax button的使用  ...

  7. Easyui入门视频教程 第06集---Layout初始化和属性方法使用

    目录 ----------------------- Easyui入门视频教程 第09集---登录完善 图标自定义   Easyui入门视频教程 第08集---登录实现 ajax button的使用  ...

  8. Easyui入门视频教程 第05集---Easyui复杂布局

    目录 ----------------------- Easyui入门视频教程 第09集---登录完善 图标自定义   Easyui入门视频教程 第08集---登录实现 ajax button的使用  ...

  9. Easyui入门视频教程 第04集---Easyui布局

    目录 目录 ----------------------- Easyui入门视频教程 第09集---登录完善 图标自定义   Easyui入门视频教程 第08集---登录实现 ajax button的 ...

  10. Easyui入门视频教程 第03集---Easyui布局

    Easyui入门视频教程 第03集---Easyui布局 目录 ----------------------- Easyui入门视频教程 第09集---登录完善 图标自定义   Easyui入门视频教 ...

随机推荐

  1. Jquery.Page.js 分页插件的使用

    1.简单直接贴代码 需要引用以下样式和脚本 <link href="~/Scripts/Page/pager.css" rel="stylesheet" ...

  2. Hadoop Hello World

    Hadoop单机环境配置OK后,需要找个例子测试一下Mapreduce功能.因此从Hadoop源代码中找到一个例子:WordCount.java,来验证. 编译过程如下: cd hadoop-exam ...

  3. Program B 暴力求解

    Given a sequence of integers S = {S1,S2,...,Sn}, you should determine what is the value of the maxim ...

  4. MyEclipse取消验证Js的两种方法

    MyEclipse取消验证Js的两种方法 作者: 字体:[增加 减小] 类型:转载 通过js写一个web工程的相关页面时感觉很卡,修改内存也不行下面有两种解决方法,大家可以尝试下 前言:有时我们通过j ...

  5. 【转发】Linux下清除系统日志方法

    摘要:相信大家都是用过Windows的人.对于Windows下饱受诟病的各种垃圾文件都需要自己想办法删除,不然你的系统将会变得越来越大,越来越迟钝!windows怎么清理垃圾相信大家都知道的,那么li ...

  6. Unity开发Android应用程序:调用安卓应用程序功能

    开发环境: Eclipse3.4 + adt12 + jdk6 + AndroidSDK2.2 Unity3.4 + windows7 测试设备: HTC Desire HD 本文要涉及到的几个重点问 ...

  7. Microsoft Visual Studio Ultimate 2013 with Update 3 CN+EN

    官方90天试用版. Microsoft Visual Studio Ultimate 2013 with Update 3 - 简体中文DVD5 ISO image (SHA-1: 9A306631A ...

  8. Cocoa Drawing

    Graphics Contexts Graphics contexts are a fundamental part of the drawing infrastructure in Cocoa ap ...

  9. Android布局— — —线性布局

    以水平或垂直的方式显示界面中的控件 线性布局 语法格式: <LinearLayout xmlns:android="http://schemas.android.com/apk/res ...

  10. lightoj1038

    //Accepted 2860 KB 16 ms //概率 //对于n,假设n变成1的期望步数为p(n) //则p(n)=1/t*sum((1+p(d))) d|n //解得:p(n)=1/(t-1) ...