<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<link rel="stylesheet" type="text/css" href="jquery-easyui-1.3.3/themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="jquery-easyui-1.3.3/themes/icon.css">
<link rel="stylesheet" type="text/css" href="jquery-easyui-1.3.3/demo/demo.css">
<script type="text/javascript" src="jquery-easyui-1.3.3/jquery.min.js"></script>
<script type="text/javascript" src="jquery-easyui-1.3.3/jquery.easyui.min.js"></script>
<script type="text/javascript" src="jquery-easyui-1.3.3/locale/easyui-lang-zh_CN.js"></script>
<script>
function submitForm(){
$('#form').form('submit');
}
function clearForm(){
$('#form').form('clear');
}
</script>
</head>
<body>
<h2>表单组件</h2>
<div class="demo-info">
<div class="demo-tip icon-tip"></div>
<div>填写表单,然后提交.</div>
</div>
<div style="margin:10px 0;"></div>
<div class="easyui-panel" title="登录窗体" style="width:400px">
<div style="padding:10px 0 10px 60px">
<form id="form" action="#" method="post">
<table>
<tr>
<td>姓名:</td>
<td>
<input class="easyui-validatebox" type="text" name="name" data-options="required:true" />
</td>
</tr>
<tr>
<td>密码:</td>
<td>
<input class="easyui-validatebox" type="password" name="pass" data-options="required:true"></input>
</td>
</tr>
</table>
</form>
</div>
<div style="text-align:center;padding:5px">
<a href="javascript:void(0)" class="easyui-linkbutton" οnclick="submitForm()">提交</a>
<a href="javascript:void(0)" class="easyui-linkbutton" οnclick="clearForm()">重置</a>
</div>
</div>
</body>
</html>
转载于:https://www.cnblogs.com/airycode/p/5082920.html