AJAX Sample
来源:互联网 发布:比特币挖矿软件 编辑:程序博客网 时间:2024/05/21 06:43
<html><head><title>Simple Ajax Example</title><script language="Javascript">function xmlhttpPost(strURL) { var xmlHttpReq = false; var self = this; // Mozilla/Safari if (window.XMLHttpRequest) { self.xmlHttpReq = new XMLHttpRequest(); } // IE else if (window.ActiveXObject) { self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP"); } self.xmlHttpReq.open('POST', strURL, true); self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); self.xmlHttpReq.onreadystatechange = function() { if (self.xmlHttpReq.readyState == 4) { updatepage(self.xmlHttpReq.responseText); } } self.xmlHttpReq.send(getquerystring());}function getquerystring() { var form = document.forms['f1']; var word = form.word.value; qstr = 'w=' + escape(word); // NOTE: no '?' before querystring return qstr;}function updatepage(str){ document.getElementById("result").innerHTML = str;}</script></head><body><form name="f1"> <p>word: <input name="word" type="text"> <input value="Go" type="button" onclick='JavaScript:xmlhttpPost("/cgi-bin/simple-ajax-example.cgi")'></p> <div id="result"></div></form></body></html>
http://www.degraeve.com/reference/simple-ajax-example.php
- AJAX Sample
- Ajax Sample in w3schools
- ajax in jsp sample
- Sample ASP.NET AJAX Application
- html 关机效果(AJAX LightBox Sample)
- Ajax传Jsond,Mvc后台接收sample
- sample
- !!!sample
- sample
- [AJAX Control] Sample Code for Accordion Control DataSource
- mail sample
- sample.l
- log4j sample
- sample code
- winApi Sample
- Filter sample
- [ioctrl] sample
- Ant Sample
- centos升级jdk
- 今天看了json格式随手写一个json格式的数据集
- Shell排序和归并排序
- Spring自动装配总结
- 程序员是拖Button的吗?
- AJAX Sample
- 一个正则表达式的封装类
- 集合的链式存储及操作实现
- 配置SQLServer发送电子邮件的介绍
- mysql复制的一个问题
- poj 1190 有些剪枝真是不好想啊。。。
- Fence Repair(P3253)
- 全排列算法
- 软件质量简介