1. 程式人生 > >easyui 菜單按鈕&提示框

easyui 菜單按鈕&提示框

pat lin page public form表單 改密 -o res 調用

<script type="text/javascript">
function updatePwd(){
    alert(‘修改密碼‘);
}
</script>
</head>
<body>
<a class="easyui-menubutton" data-options="menu:‘#mm‘,iconCls:‘icon-help‘">控制面板</a>
<div id="mm">
    <div on·click="updatePwd()">修改密碼</div>
    <div>退出系統</div>
    <div class
="menu-sep"></div> <div>關於系統</div> </div> </body>



















$(function(){
//     alert(1111);
//info  warning   question   error
//     $.messager.alert(‘提示標題‘,‘提示信息內容‘,‘error‘);

    /* $.messager.confirm(‘提示標題‘,‘提示信息內容‘,function(r){
        if(r){
            //執行目標操作
        }
    }); 
*/ $.messager.show({ title:‘標題‘, msg:‘歡迎您【admin】‘, showType:‘slide‘, timeout:3000 }) }) </script>






















<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Insert title here</title> <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath }/js/easyui/themes/default/easyui.css"> <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath }/js/easyui/themes/icon.css"> <script type="text/javascript" src="${pageContext.request.contextPath }/js/jquery-1.8.3.js"></script> <script type="text/javascript" src="${pageContext.request.contextPath }/js/easyui/jquery.easyui.min.js"></script> <script type="text/javascript" src="${pageContext.request.contextPath }/js/easyui/locale/easyui-lang-zh_CN.js"></script> <link rel="stylesheet" href="${pageContext.request.contextPath }/js/ztree/zTreeStyle.css" type="text/css"> <script type="text/javascript" src="${pageContext.request.contextPath }/js/ztree/jquery.ztree.all-3.5.js"></script> </head> <body> <input type="button" id="btn" value="點我"> <script type="text/javascript"> $(function(){ $(
"#btn").click(function(){ $("#myWindow").window(‘open‘); }) $("#submit1").click(function(){ //調用Form表單方法:validate 表單校驗 var r = $("#myForm").form(‘validate‘); if(r){ $("#myForm").submit(); } }) }) </script> <div class="easyui-window" id="myWindow" data-options="collapsible:false,minimizable:false,maximizable:false,resizable:false,draggable:false" style="width: 600px;height: 300px" title="添加窗口"> <form id="myForm" action="xxx.action" method="post"> 用戶名:<input class="easyui-validatebox" data-options="required:true,validType:‘length[3,6]‘" type="text" name="username"> 密碼:<input type="text" class="easyui-validatebox" data-options="required:true" name="pwd"> <br> <input id="submit1" value="提交" type="button"> <!-- <input type="submit" value="提交"> --> </form> </div> </body> </html>

easyui 菜單按鈕&提示框