<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
	pageContext.setAttribute("APP_PATH", request.getContextPath());
%>
<!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>添加demo</title>
<!-- 引入Jquery -->
<script type="text/javascript"
	src="${APP_PATH}/static/js/jquery-2.1.1.min.js"></script>

<style type="text/css">
.tabl td {
	font-size: 16px;
	font-weight: bold;
}

.tabl {
	height: 460px;
}

.tabl td input {
	height: 30px;
	width: 260px;
	border-radius: 4px;
	font-size: 14px;
}

.tabl .sele {
	height: 36px;
	width: 260px;
	border-radius: 4px;
}
</style>
<script type="text/javascript">
	function ret() {
		window.location.href = "${pageContext.request.contextPath}/admin/adminDemo_findAllByPage.action?page=1";
	}

	$(document).on("click", ".sav", function() {
		alert("添加完成！！！");
	});

	function checkForm() {
		var dname = document.getElementById("dname").value;
		var comment = document.getElementById("comment").value;
		if (pname == null || pname == '') {
			alert("demo名不能为空");
			window.location.reload();
		}
		window.location.href = "${pageContext.request.contextPath}/demo/addOk.action";
	}
</script>
</head>
<body>
	<div>
		<div class="b" style="float: left; padding-left: 30px;">
			<h2>添加demo</h2>
		</div>
		<div align="right" style="padding-right: 60px; padding-top: 20px;">
			<input type="button" onclick="history.go(-1)" value="返回"
				style="width: 74px; height: 40px; background-color: #0f83c7; color: white; margin-left: 800px;"
				align="right" />
		</div>
	</div>
	<hr
		style="height: 1px; border: none; border-top: 1px solid #555555; width: 95%" />
	<div style="margin-left: 60px;" class="formm">
		<form id="userAction_save_do" name="Form1"
			action="${pageContext.request.contextPath}/demo/addOk.action"
			method="post" enctype="multipart/form-data">
			<table class="tabl">
				<tr>
					<td style="text-align: right;">demo名：</td>
					<td width="20"></td>
					<td><input type="text" name="dname" placeholder="请输入demo名" /></td>
				</tr>
				<tr>
					<td>备注：</td>
					<td width="20"></td>
					<td><textarea name="comment" rows="5" cols="35"></textarea></td>
				</tr>

				<tr>
					<td align="right"><button type="reset" value="重置"
							style="width: 70px; height: 38px; background-color: #0f83c7; color: white;">&#37325;&#32622;</button></td>
					<td></td>
					<td align="center">
						<button type="submit" id="userAction_save_do_submit" value="提交"
							class="submit_btn sav"
							style="width: 70px; height: 38px; background-color: #0f83c7; color: white;">&#30830;&#23450;</button>
					</td>
				</tr>
			</table>
		</form>
	</div>
</body>
</html>

