用easyui写一个密码修改的dialog

效果图如下:

需要准备的页面和js以及css如下:

modifyPswd.html

<!DOCTYPE html>
<html>

	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<title>Ajax Form - jQuery EasyUI Demo</title>
		<link rel="stylesheet" type="text/css" href="http://www.jeasyui.com/easyui/themes/default/easyui.css">
		<link rel="stylesheet" type="text/css" href="http://www.jeasyui.com/easyui/themes/icon.css">
		<link rel="stylesheet" type="text/css" href="css/base.css">
		<script type="text/javascript" src="js/jquery-1.9.0.min.js"></script>
		<script type="text/javascript" src="js/jquery.easyui.min.js"></script>
		<script type="text/javascript">
			$(function() {
				$("#diagl").click(function() {
					$('#dlg').dialog({
						title: '修改密码',
						iconCls: "icon-edit",
						collapsible: true,
						minimizable: true,
						maximizable: true,
						resizable: true,
						width: 300,
						height: 200,
						modal: true
					});
				});

			});
		</script>
	</head>

	<body>
		<button id="diagl">点击展示对话框</button>
		<div id="dlg" style="display: none;">
			<div class="bodydiv">
				<div class="content-main-view">
					<form id="modifPwd" method="post">
						<div style="margin-top: 20px; margin-left: 25px;">
							<div class="trs">
								<label>原密码:</label>
								<div>
									<input class="easyui-textbox" type="password" id="login_passwd_new_re" name="login_passwd_new_re" data-options="required:true"></input>
								</div>
							</div>
							<div class="trs">
								<label>新密码:</label>
								<div>
									<input class="easyui-textbox" type="password" id="login_passwd_new_re" name="login_passwd_new_re" data-options="required:true"></input>
								</div>
							</div>
							<div class="trs">
								<label>确认密码:</label>
								<div>
									<input class="easyui-textbox" type="password" id="login_passwd_new_re" name="login_passwd_new_re" data-options="required:true"></input>
								</div>
							</div>
						</div>
					</form>
					<div class="main-view-button-group">
						<a href="javascript:void(0)" class="easyui-linkbutton" onclick="do_submit();">提交</a>
						<a href="javascript:void(0)" class="easyui-linkbutton" onclick="closeWin();">取消</a>
					</div>
				</div>
			</div>
		</div>
	</body>

</html>

需要的js如下:

<link rel="stylesheet" type="text/css" href="http://www.jeasyui.com/easyui/themes/default/easyui.css">
		<link rel="stylesheet" type="text/css" href="http://www.jeasyui.com/easyui/themes/icon.css">
		<link rel="stylesheet" type="text/css" href="css/base.css">
		<script type="text/javascript" src="js/jquery-1.9.0.min.js"></script>
		<script type="text/javascript" src="js/jquery.easyui.min.js"></script>

 

需要的css如下:

base.css

label{
	display:block;
	float:left;
	width:80px;
	padding-top: 5px;
	}
.main-view-button-group{
	width: 200px;
	margin-left:auto;
	margin-right: auto;
	margin-top: 10px;
	}
.easyui-linkbutton{
	display: inline-block;
	margin-left: 35px;
	width: 50px;
	}
.trs{
	margin-top: 5px;
	}
.easyui-textbox{
	width: 120px;;
}

icon.css(这个是直接从easyui的demo里拿出来的)

.icon-blank{
	background:url('icons/blank.gif') no-repeat center center;
}
.icon-add{
	background:url('icons/edit_add.png') no-repeat center center;
}
.icon-edit{
	background:url('icons/pencil.png') no-repeat center center;
}
.icon-clear{
	background:url('icons/clear.png') no-repeat center center;
}
.icon-remove{
	background:url('icons/edit_remove.png') no-repeat center center;
}
.icon-save{
	background:url('icons/filesave.png') no-repeat center center;
}
.icon-cut{
	background:url('icons/cut.png') no-repeat center center;
}
.icon-ok{
	background:url('icons/ok.png') no-repeat center center;
}
.icon-no{
	background:url('icons/no.png') no-repeat center center;
}
.icon-cancel{
	background:url('icons/cancel.png') no-repeat center center;
}
.icon-reload{
	background:url('icons/reload.png') no-repeat center center;
}
.icon-search{
	background:url('icons/search.png') no-repeat center center;
}
.icon-print{
	background:url('icons/print.png') no-repeat center center;
}
.icon-help{
	background:url('icons/help.png') no-repeat center center;
}
.icon-undo{
	background:url('icons/undo.png') no-repeat center center;
}
.icon-redo{
	background:url('icons/redo.png') no-repeat center center;
}
.icon-back{
	background:url('icons/back.png') no-repeat center center;
}
.icon-sum{
	background:url('icons/sum.png') no-repeat center center;
}
.icon-tip{
	background:url('icons/tip.png') no-repeat center center;
}
.icon-filter{
	background:url('icons/filter.png') no-repeat center center;
}
.icon-man{
	background:url('icons/man.png') no-repeat center center;
}
.icon-lock{
	background:url('icons/lock.png') no-repeat center center;
}


.icon-mini-add{
	background:url('icons/mini_add.png') no-repeat center center;
}
.icon-mini-edit{
	background:url('icons/mini_edit.png') no-repeat center center;
}
.icon-mini-refresh{
	background:url('icons/mini_refresh.png') no-repeat center center;
}

.icon-large-picture{
	background:url('icons/large_picture.png') no-repeat center center;
}
.icon-large-clipart{
	background:url('icons/large_clipart.png') no-repeat center center;
}
.icon-large-shapes{
	background:url('icons/large_shapes.png') no-repeat center center;
}
.icon-large-smartart{
	background:url('icons/large_smartart.png') no-repeat center center;
}
.icon-large-chart{
	background:url('icons/large_chart.png') no-repeat center center;
}

然后就可以直接运行查看效果了。

转载于:https://my.oschina.net/u/1399599/blog/1548625

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值