03 2010 档案
一个c#的与web服务器交互的HttpClient类
摘要:using System;using System.Collections.Generic;using System.IO;using System.Text;using System.Net;using System.Web;namespace Deerchao.Utility{ public class HttpClient { #region fields private bool keep...
阅读全文
HttpWebRequest 向网站提交数据
摘要:HttpWebRequest 是 .net 基类库中的一个类,在命名空间 System.Net 下面,用来使用户通过 HTTP 协议和服务器交互。HttpWebRequest 对 HTTP 协议进行了完整的封装,对 HTTP 协议中的 Header, Content, Cookie 都做了属性和方法的支持,很容易就能编写出一个模拟浏览器自动登录的程序。程序使用 HTTP 协议和服务器交互主要是进行...
阅读全文
Ajax.Request方法
摘要:Ajax.Request(url,{method:method,parameters:para,postBody:xmlString,asynchronous:true,setRequestHeader:Object,onComplete:completeFun,onError:errorFun})发送异步请求。(此方法是为兼容 prototype.js 而写,调用风格与 prototype 一致...
阅读全文
javascript小数四舍五入
摘要:用Javascript取float型小数点后两位,例22.127456取成22.13,如何做?1. 最笨的办法.......function get(){ var s = 22.127456 + ""; var str = s.substring(0,s.indexOf(".") + 3); alert(str);}2. 正则表达式效果不错<script type="text/javascr...
阅读全文