
4 changed files with 175 additions and 72 deletions
@ -0,0 +1,84 @@ |
|||
<!DOCTYPE html> |
|||
<html class="no-js" lang="zh-CN"> |
|||
<head> |
|||
<meta http-equiv="content-type" content="text/html; charset=UTF-8"> |
|||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> |
|||
<script type="text/javascript" src="{$smarty.const.CSS_URL}/js/jquery-1.8.1.min.js"></script> |
|||
<script type="text/javascript" src="{$smarty.const.CSS_URL}/js/jquery.form.js"></script> |
|||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
|||
<title>登录</title> |
|||
<meta name="viewport" content="width=device-width,initial-scale=1"> |
|||
<link href="{$smarty.const.CSS_URL}/css/global.css?v={$smarty.const.CSS_JS_VERSION}" media="screen" rel="stylesheet" |
|||
type="text/css"> |
|||
</head> |
|||
<body> |
|||
|
|||
<div id="page"> |
|||
<div class="container"> |
|||
<section id="main"> |
|||
<form id="prescription-form" onsubmit="submitForm(event)"> |
|||
<input id="id" name="id" type="hidden" value="{$data.id}"> |
|||
|
|||
<div class="row"> </div> |
|||
|
|||
<div class="row"> |
|||
<label for="name">用户名<font color='red'>*</font>:</label> |
|||
<input type="text" id="name" name="name" maxlength="" style="width:280px" value="{$data.name}"> |
|||
</div> |
|||
|
|||
<div class="row"> </div> |
|||
|
|||
<div class="row"> |
|||
<label for="source">密码<font color='red'>*</font>:</label> |
|||
<input type="text" id="password" name="password" maxlength="" style="width:280px" |
|||
value="{$data.source}"> |
|||
</div> |
|||
|
|||
<div class="row"> </div> |
|||
|
|||
<div class="row" id="" style="position:relative;"> |
|||
<label> </label> |
|||
|
|||
<button class="button primary next submitlock" id="submitbtn" onclick="check_submit()"><span class="tdesc_text" style="color:white;">提交</span></button> |
|||
</div> |
|||
|
|||
</form> |
|||
</section><!--end of main section--> |
|||
|
|||
</div><!--end of container--> |
|||
|
|||
</div><!--end of #page--> |
|||
|
|||
{literal} |
|||
<script type="text/javascript"> |
|||
function submitForm(e) { |
|||
e.preventDefault(); // 阻止默认表单提交 |
|||
|
|||
const form = document.getElementById('prescription-form'); |
|||
const formData = new FormData(form); |
|||
|
|||
const name = formData.get('name'); |
|||
const password = formData.get('password'); |
|||
|
|||
location.href = "/index/login/name/" + name + "/password/" + password; |
|||
} |
|||
</script> |
|||
<style> |
|||
#main { |
|||
width: 600px; |
|||
height: 300px; |
|||
position: absolute; |
|||
top: 50%; |
|||
left: 50%; |
|||
margin-left: -300px; |
|||
margin-top: -150px; |
|||
} |
|||
|
|||
#prescription-form { |
|||
margin: 0 auto; |
|||
} |
|||
</style> |
|||
{/literal} |
|||
|
|||
</body> |
|||
</html> |
Loading…
Reference in new issue