正在加载图片...
XmlhTtpreqUest对象的方法 LOGO open方法 open ("method", URL async) method:说明所发送的请求类型的字符串—通常是GET或POST URL:说明发送请求的目标URL的字符串 async:布尔值,用来说明请求是否为异步模式 send方法 请求不包含主体(GET请求就不包含),则必须传入m∥楼的字符串。如果 完成请求的发送。该方法只接受一个参数,即表示请求主题 function sayHello()( //ifourXmlhttpreqUestobjectisnotinthemiddleofarequest if (receiveReq readystate = 4 I receiveReq ready state =s 0)( //Setup the connection as a GEt call to sayHello. html //True explicity sets the request to asyncronous (default) receiveReq open("GET, ' SayHello.html', true) //setthefunctionthatwillbecalledwhentheXmlhttpreque receiveReq onreadystatechange handlesayHello //Make the actual request. receiveReg. send(null) www.nordridesign.comLOGO www.nordridesign.com XMLHttpRequest 对象的方法 13 open方法 open("method","URL", async) • method:说明所发送的请求类型的字符串——通常是GET或POST • URL:说明发送请求的目标URL的字符串 • async:布尔值,用来说明请求是否为异步模式 send方法 完成请求的发送。该方法只接受一个参数,即表示请求主题的字符串。如果 请求不包含主体(GET请求就不包含),则必须传入null
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有