php\ajax Hello代码
来源:互联网 发布:初级程序员培训班 编辑:程序博客网 时间:2024/06/05 14:45
html页面代码
-----------------------------------------------------------------------------------------------------------------------------------------------
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en_US" xml:lang="en_US">
<!--
* Created on 2015-5-21
*
* To change the template for this generated file go to
* Window - Preferences - PHPeclipse - PHP - Code Templates
-->
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf8"/>
<title>hello </title>
<script type="text/javascript">
var xmlhttp_request=false;
try{
if(window.ActiveXObject){
for(var i=5;i;i--){
try{
if(i==2){
xmlhttp_request=new ActiveXObject("Microsoft.XMLHTTP");
}else{
xmlhttp_request=new ActiveXObject("Msxml2.XMLHTTP."+i+".0");
xmlhttp_request.setRequestHeader("Content-Type","text/xml");
xmlhttp_request.setRequestHeader("Charset","utf-8");
}
break;
}catch(e){
xmlhttp_resquest=false;
}
}
}else if(window.XMLHttpRequest){
xmlhttp_request=new XMLHttpRequest();
if(xmlhttp_request.overrideMimeType){
xmlhttp_request.overrideMimeType("text/xml");
}
}
}catch(e){
xmlhttp_request=false;
}
function hello(btn){
var url="14.8.php";
xmlhttp_request.onreadystatechange=function(){
if(xmlhttp_request.readyState==4 && xmlhttp_request.status==200){
btn.value=xmlhttp_request.responseText;
alert(xmlhttp_request.responseText);
}
}
xmlhttp_request.open("POST",url,true);
xmlhttp_request.send(null);
}
</script>
</head>
<body>
<input type="button" value="第一个AJAX程序" name="submit" id="submit" onclick="hello(this);"/>
</body>
</html>
#####################################################################################
php代码
<?php
/*
* Created on 2015-5-21
*
* To change the template for this generated file go to
* Window - Preferences - PHPeclipse - PHP - Code Templates
*/
echo "Hello,Ajax!";
?>
- php\ajax Hello代码
- php+ajax简单实例代码
- PHP ajax 分页类代码
- ajax --- jquery + php 代码整理
- Ajax与PHP【1.4代码】
- Hello! Ajax!
- Hello! Ajax!
- Hello Ajax!
- Hello! Ajax!
- Hello! Ajax!
- Hello! Ajax!
- Hello! Ajax!
- ajax+php文件上传代码 - php上传下载
- Hello PHP
- Hello,PHP!
- hello,PHP
- AJAX结合PHP代码实现登录
- AJAX结合PHP代码实现登录
- linux命令大全(自己制作,基于鸟书私房菜以及man)-E
- 构造函数定义为private,protected
- 【牛腩视频】之SQL触发器
- Thinkphp app类分析
- cocos2dx 音频模块分析(4): 音效部分
- php\ajax Hello代码
- qorIQ处理器
- Android开发者官方网站文档 - 国内踏得网镜像
- android 获取Context奇巧录
- 关于Android中onTouch时间与onClick事件的监听问题
- OC面向对象总结
- Android:主题(Theme)
- Git使用方法-下载子模块 vtm 开源android地图
- HTML设置页面透明度<转载>