验证码点击刷新 this.src=this.src+'?'+Math.random()
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>后台管理</title>
<link rel="stylesheet" type="text/css" href="__ADMINRES__/css/style.css" />
<script type="text/javascript" src="__ADMINRES__/js/jquery.js"> </script>
<script type="text/javascript">
function check(form)
{
if(form.username.value == '')
{
alert("用户名不能为空");
form.username.focus();
return false;
}
if(form.password.value == '')
{
alert("密码不能为空");
form.password.focus();
return false;
}
if(form.code.value == '')
{
alert("验证码不能为空");
form.code.focus();
return false;
}
return true;
}
</script>
</head>
<body>
<div id="loginpanelwrap">
<div class="loginheader">
<div class="logintitle"><a href="#">Panelo Admin</a></div>
</div>
<form action = "{:U('Public/do_login')}" method = "post" onsubmit="return check(this)">
<div class="loginform">
<div class="loginform_row">
<label>用户名:</label>
<input type="text" class="loginform_input" name="username" value="admin" />
</div>
<div class="loginform_row">
<label>密码:</label>
<input type="text" class="loginform_input" name="password" value = "admin"/>
</div>
<div class="loginform_row">
<label>验证码:</label>
<input type="text" class="loginform_input" name="code" style="width:150px" />
<img src="{:U('Public/captcha')}" style="margin-left:5px;" onclick="show(this)" />
<script>
function show(obj){
obj.src = '{:U("Public/captcha","","")}/rand/'+Math.random();
}
</script>
</div>
<div class="loginform_row">
<input type="submit" class="loginform_submit" value="Login" />
</div>
<div class="clear"></div>
</div>
</form>
</div>
</body>
</html>
相关文章
- KDD'21「华为」数值型特征embedding方法
- ORA-01233: file string is read only – cannot recover using backup control file ORACLE 报错 故障修复 远程处理
- ORA-19273: XQST0053 – empty string in namespace declaration ORACLE 报错 故障修复 远程处理
- oracle插入字符串数据时字符串中有'单引号问题
- Another app is currently holding the yum lock; waiting for it to exit…另一个应用程序在占用yum lock,等待其退出。详解程序员
- Oracle 等待事件 enq: OW – initialization 官方解释,作用,如何使用及优化方法
- ‘Musique’增添了专辑排序、无缝播放和播放列表调整功能
- 使用公共 Registry – 每天5分钟玩转 Docker 容器技术(19)