1、input只允许输入数字(一般用于金额使用)
2、模拟http请求的参数类型 application/json
var httpWebRequest = (HttpWebRequest)WebRequest.Create("http://url");
httpWebRequest.ContentType = "application/json";
httpWebRequest.Method = "POST";using (var streamWriter = new StreamWriter(httpWebRequest.GetRequestStream()))
{string json = "{"user":"test"," +""password":"bla"}";streamWriter.Write(json);streamWriter.Flush();streamWriter.Close();
}var httpResponse = (HttpWebResponse)httpWebRequest.GetResponse();
using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
{var result = streamReader.ReadToEnd();
}