首页 > 代码库 > 一个简单ajax实现方式

一个简单ajax实现方式

http://www.cnblogs.com/rubylouvre/archive/2013/01/08/2851051.html

  

<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
</head>
<body>
	<script>
		Ajax = function(){
		    function request(url,opt){
		        function fn(){}
		        var async   = opt.async !== false,
		            method  = opt.method    || ‘GET‘,
		            data    = http://www.mamicode.com/opt.data      || null,"http://baidu.com",{method:"POST"}));
	</script>
</body>
</html>

  

一个简单ajax实现方式