AJAX
来源:互联网 发布:制作彩铃用什么软件 编辑:程序博客网 时间:2024/06/05 06:01
- <html>
- <body>
- <script type="text/javascript">
- function ajaxFunction()
- {
- var xmlHttp;
- try
- {
- // Firefox, Opera 8.0+, Safari
- xmlHttp=new XMLHttpRequest();
- }
- catch (e)
- {
- // Internet Explorer
- try
- {
- xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
- }
- catch (e)
- {
- try
- {
- xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
- }
- catch (e)
- {
- alert("Your browser does not support AJAX!");
- return false;
- }
- }
- }
- xmlHttp.onreadystatechange=function()
- {
- if(xmlHttp.readyState==4 && xmlHttp.status == 200)
- {
- alert(xmlHttp.responseText)
- // document.write(xmlHttp.responseText);
- document.myForm.time.value=xmlHttp.responseText;
- }
- }
- xmlHttp.open('POST', '/myProject/test01.do?method=ajax', true);
- //其中 test01是在struts的配置文件的action 的path属性中设置的
- xmlHttp.send(null);
- }
- </script>
- <form name="myForm">
- Name: <input type="text"
- onkeyup="ajaxFunction();" name="username" />
- Time: <input type="text" name="time" />
- </form>
- </body>
- </html>
- Ajax
- Ajax
- AJAX
- AJAX
- AJAX
- AJAX
- AJAX
- ajax
- ajax
- Ajax
- ajax
- ajax
- AJAX
- Ajax
- Ajax
- Ajax
- ajax
- ajax
- 一个ip,2个域名想用不同的域名访问不同网站,如何配置APACHE?
- 计算2000~2099年任一天星期几
- 职称计算机考试选考模块建议
- 郁闷了2天的问题终于解决了(MSDN无法显示页面的解决 )
- 表格 列与列之间的间距
- AJAX
- 如何给Win7添加快速启动
- 大家好···
- 关于html-x1.1的发布
- Java数据导出到excel
- c#读取Excel的第一个Sheet表
- 程序员考核的五大死因(上)
- Linux的引导启动程序
- php+mysql编码问题总结