php 的 ajax 实现
<script type="text/javascript" src="jquery-1.3.2.min.js"></script>
<input type="button" onclick="test();" value="提交"/>
<script type="text/javascript">
function test(){
var valid = {
username: 'taoge',
password: '123456'
};
$.ajax({
url: 'valid.php',
type: 'get',
data: valid, // 发送的数据
dataType: 'json', // 发送/接收数据的格式
success: function(data){
alert(""+data.username);
},
error: function(data){
alert("xxx"+data);
}
});
}
</script>
===========================
valid.php
相关文档:
环境:Ajax+JSP,Tomcat5.05
参考:http://www.w3cschool.cn/index-24.asp.htm
文件:testAjax.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb ......
JavaScript 简单理解Ajax异步调用操作的文章。
文章地址:http://www.soaspx.com/dotnet/ajax/javascript/javascript_20090915_349.html
这篇文章是理解Ajax技术的简单例程,挺简明扼要,很容易理解。
Ajax提供与服务器异步通信的能力,借助于Ajax,可以在用户单击按钮时,使用JavaScript和 DHTML立即更新UI,并向服务器 ......
原文链接:http://www.williamlong.info/archives/1846.html
在Windows IIS
6.0下配置PHP
,通常有CGI
、ISAPI
和FastCGI
三种配置方式,这三种模式都可以在IIS
6.0下成功运行,下面我就讲一下这三种方式配置的区别和性能上的差异。
1、CGI
(通用网关接口/Common Ga ......
最近在Greg Beaver's的blog上发表的一篇新文章 comparing strings in PHP with the == operator 中提及了PHP的 == 运算符在对字符串进行比较时值得注意的问题。
在某些情况下,PHP会把类数值数据(如含有数字的字符串等)转换成数值处理,== 运算符就是其中之一。在使用 == 运算符对两个字符串进行松散比较时,PHP会把类数 ......
checkcode.php
====================
<?php
session_start();
$funcs = array('imagecreatetruecolor','imagecolorallocate','imagefill','imageline','imagedestroy','imagecolorallocatealpha','imageellipse','imagepng');
if(!function_exists('ob_gzhandler'))
ob_clean();
//crea ......