📄 default.aspx
字号:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="ValidationCode._Default" %>
<!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 id="Head1" runat="server">
<title>简单四则运算验证码</title>
<script language="javascript" type="text/javascript">
var div;
function callback()
{
var name=document.getElementById("UserName").value;
var pass=document.getElementById("PassWord").value;
var checkcode=document.getElementById("CheckCode").value;
div=document.getElementById("show_msg");
div.innerHTML = "<img src=images/loading.gif>"+ '正在验证,请稍后..';
div.style.backgroundColor="AliceBlue";
dos(name+"&"+pass+"&"+checkcode);
}
function ReceiveServerData(text)
{
alert(text);
div.style.display="none";
location.href = location.href;
}
function over(o)
{
o.style.borderColor="#CCCCFF";
}
function out(o)
{
o.style.borderColor="#000000";
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<table style="width: 300px; height: 96px;">
<tr>
<td style="width: 150px" align="right">
<asp:Label ID="Label1" runat="server" Text="用户名" ></asp:Label></td>
<td style="width: 281px">
<input id="UserName" value="123" type="text" style="border-style:groove; border-color:#000000; width:148px" onmouseout="out(this)" onmouseover="over(this)" /></td>
</tr>
<tr>
<td style="width: 150px; height: 12px;" align="right">
<asp:Label ID="Label2" runat="server" Text="密码" Width="44px"></asp:Label></td>
<td style="width: 281px; height: 12px;">
<input id="PassWord" value="123" type="password" style="border-style:groove; border-color:#000000; width:148px" onmouseout="out(this)" onmouseover="over(this)" /></td>
</tr>
<tr>
<td style="width: 150px" align="right">
<asp:Label ID="Label3" runat="server" ForeColor="Blue" Text="请填写结果"></asp:Label>
</td>
<td style="height: 13px; width: 281px;">
<input id="CheckCode" style="border-style:groove; border-color:#000000; width:55px" onmouseout="out(this)" onmouseover="over(this)" type="text" maxlength="4" />
<asp:Image ID="Image1" runat="server" ImageUrl="Image2.aspx" /></td>
</tr>
<tr>
<td style="height: 26px; width: 150px;" align="right">
</td>
<td style="width: 281px; height: 26px">
<input id="Login" type="button" value="登 陆" onclick="callback()" style="width: 60px" />
</td>
</tr>
<tr>
<td style="width: 150px;" align="right">
</td>
<td style="width: 281px;">
<div id="show_msg"></div>
</td>
</tr>
</table>
</div>
</form>
<a href="http://www.51aspx.com/" target="_blank">download from 51aspx.com</a>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -