怎么将表单提交给Login.aspx页面。

神行影 神行影 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
html代码
-----------------------
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<script type="text/javascript">
function ss(str){ //字符长度
var n=0;
for(i=0;i<str.length;i++)
{
var aa=str.charCodeAt(i);
if(aa>255)
{
n+=2;
}
else
{
n+=1;
}
}
if(n>10||n<6)
{
return true;
}
else
{
return false;
}

}
</script>
<script type="text/javascript">
function cc(){
var name=document.getElementById("txt1");
var x=2;
if(x>0)
{
if(ss(name.value))
{
alert("用户名长度只能在6-10之间");
x=x-1;
}
if(txt2.value!=txt3.value)
{
alert("密码和确认密码必须一致");
x=x-1;
}
}
else
{

}

}
function quxiao(){
txt1.value="";
txt2.value="";
txt3.value="";
}
</script>
<form>
新用户名:<input type="text" id="txt1" name="txt1" /><br />
新  密  码:  <input type="text" id="txt2" name="txt2" /><br />
确认密码:<input type="text" id="txt3" name="txt3" /><br />
<input type="button" id="but1" name="but1" value="确认" onclick="cc()" />                           
<input type="button" id="but2" name="but2" value="取消" onclick="quxiao()" />
</form>
</body>
</html>






Login.aspx代码
前台
-----------------

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Login.aspx.cs" Inherits="Login" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>

</div>
</form>
</body>
</html>



后台
-------------
没写



...全文

相关推荐

评论 3
收藏 已收藏
分享
返回顶部
神行影
.NET社区 62,271 成员 668,968 内容