(一)easyUI之第一个demo

(一)easyUI之第一个demo一、下载官网下载:http://www.jeasyui.net/download/同时并下载官方中文API文档。解压后的目录结构:二、第一个demo1新建工程并导入包1新建工程并导

大家好,又见面了,我是你们的朋友全栈君。

一、下载

  • 官网下载 : http://www.jeasyui.net/download/   同时并下载官方中文API文档。
  • 解压后的目录结构:
  • <span role="heading" aria-level="2">(一)easyUI之第一个demo

     

二、第一个demo

  •   1      新建工程并导入包

<span role="heading" aria-level="2">(一)easyUI之第一个demo

  •  2.       在页面中引入资源

<link rel="stylesheet" type="text/css"
    href="<%=path%>/script/easyUI-1.4/themes/bootstrap/easyui.css">
<link rel="stylesheet" type="text/css"
    href="<%=path%>/script/easyUI-1.4/themes/icon.css">
<script type="text/javascript"
    src="<%=path%>/script/easyUI-1.4/jquery-1.8.3.min.js"></script>
<script type="text/javascript"
    src="<%=path%>/script/easyUI-1.4/jquery.easyui.min.js"></script>
  •  3.       编写html页面

<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html >
<html>
<%
    String path = request.getContextPath();
%>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<link rel="stylesheet" type="text/css"
    href="<%=path%>/script/easyUI-1.4/themes/bootstrap/easyui.css">
<link rel="stylesheet" type="text/css"
    href="<%=path%>/script/easyUI-1.4/themes/icon.css">
<script type="text/javascript"
    src="<%=path%>/script/easyUI-1.4/jquery-1.8.3.min.js"></script>
<script type="text/javascript"
    src="<%=path%>/script/easyUI-1.4/jquery.easyui.min.js"></script>
</head>
<script type="text/javascript">
    jQuery(function() {
        $("#panel_2").panel({
            title : "第二个面板",
            collapsible : true,
            maximizable : true,
            minimizable : true,
            //事件
            onMaximize : function() {
                alert("执行最大化操作");
            }
        });
    });

    function changeTitle() {

        $("#panel_1").panel("setTitle", "修改后的标题");

    }
    
    
    function changeTitle2() {

        $("#panel_2").panel("setTitle", "修改后的标题");

    }
    
</script>

<body>
    <pre>
    1.    组件渲染的方法一:调用css的名称
    <div id="panel_1" 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 content1.</p>
        <p>panel content2.</p>
    </div>

    调用easyUI中的方法
    <input type="button" value="改变第一个面板的标题" onclick="changeTitle();">

    2.   组件渲染的方法二:javascript
    <div id="panel_2"
            style="width: 500px; height: 150px; padding: 10px; background: grey">
        <p>第二个面板</p>
        <p>this is no.2 panel</p>
    </div>
    调用easyUI中的方法
    <input type="button" value="改变第二个面板的标题" onclick="changeTitle2();">
</pre>
</body>
</html>
  •   结果

  • <span role="heading" aria-level="2">(一)easyUI之第一个demo

     

 

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请联系我们举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/155149.html原文链接:https://javaforall.net

(0)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • 使用批处理命令向win server AD域中批量添加用户实现

    使用批处理命令向win server AD域中批量添加用户实现因为要用个批处理命令在WindowsServer里面批量添加域用户,所以需要使用批处理命令。我这篇是纯新手教程,在百度上搜了一些批处理命令感觉属于进阶教程,研究了两天才完成我要完成的目标。下面从头说一下:批处理bat文档建立。直接新建一个TXT文档然后把后缀名改成.bat就可以了,就是一个bat文档,双击可以运行。注意:bat文件在哪,他的运行路径就在哪。添加成功的用户

    2022年5月13日
    42
  • vue toast提示_vue弹出页面

    vue toast提示_vue弹出页面创建一个message.vue组件<template><divclass=”wrap”v-if=”showWrap”:class=”showContent?’fadein’:’fadeout'”><i:class=”iconState?’success’:’wrong'”></i>…

    2022年9月2日
    2
  • plot绘图颜色_matlab画图plot详细

    plot绘图颜色_matlab画图plot详细所有颜色的名字及值:’aliceblue’:’#F0F8FF’,’antiquewhite’:’#FAEBD7′,’aqua’:’#00FFFF’,’aquamarine’:’#7FFFD4′,’azure’:’#F0FFFF’,’beige’:’#F5F5DC’,’bisque’:’#FFE4C4′,

    2022年10月15日
    0
  • [VB.NET]圖片透明化[通俗易懂]

    [VB.NET]圖片透明化[通俗易懂]原URL:http://www.dotblogs.com.tw/chou/archive/2009/02/12/7120.aspx有沒有辦法做到圖片的透明化,我們可以透過MakeTransparent達成MSDN:Bitmap.MakeTransparent方法:為這個Bitmap將預設的透明色彩變為透明。 而在此程式中,加上了讓使用者點選顏色的功能,並且讓點

    2022年7月21日
    22
  • 程序员必须了解的知识点——你搞懂mysql索引机制了吗?

    程序员必须了解的知识点——你搞懂mysql索引机制了吗?

    2020年11月20日
    311
  • dos窗口编译java程序命令_dos编译java

    dos窗口编译java程序命令_dos编译java随着RESTful风格的接口普及,程序员默认都会使用json作为数据传递的方式。json格式的数据冗余少,兼容性高,从提出到现在已被广泛的使用,可以说成为了Web的一种标准。无论我们服务端使用什么语言,我们拿到json格式的数据之后都需要做jsonDecode(),将json串转换为json对象,而对象默认会存储于HashTable,而HashTable很容易被碰撞攻击。我只要将攻击数据放在j…

    2022年9月26日
    0

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号