欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  web前端

表单序列化与jq中的serialize使用示例_javascript技巧

程序员文章站 2022-05-15 11:10:00
...
复制代码 代码如下:























姓名



密码










复制代码 代码如下:

///
/// Handler 的摘要说明
///

public class Handler02 : IHttpHandler
{
///
/// 请求处理
///

///
public void ProcessRequest(HttpContext context)
{
context.Response.ContentType = "text/plain";

// 方式2(对应表单序列化)
string userName = context.Request.Form["txtUserName"].ToString();
string userPwd = context.Request.Form["txtUserPwd"].ToString();

context.Response.Write(string.Format("姓名:{0},密码:{1}", userName, userPwd));
context.Response.End();
}

public bool IsReusable
{
get
{
return false;
}
}
}