封装Ajax

方法1
function createXMLHTTPObject(){
    var XMLHttpFactories=[
	    function (){return new XMLHttpRequest()},
		function (){return new ActiveXObject("Msxml2.XMLHTTP")},
		function (){return new ActiveXObject("Msxml3.XMLHTTP")},
		function (){return new ActiveXObject("Microsoft.XMLHTTP")},
	];
	var xmlhttp=false;
	for(var i=0;i<XMLHttpFactories.length;i++){
	    try{
		    xmlhttp=XMLHttpFactories[i]();
		}cache (e){
		    continue;
		}
		break;
	}
	return xmlhttp;
}
继续阅读“封装Ajax”

Centos7.5安装python3.7.2

安装依赖

# yum install -y gcc
# yum install -y gcc-c++
# yum -y groupinstall "Development tools" 
# yum -y install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel
# yum install libffi-devel -y

下载
# wget https://www.python.org/ftp/python/3.7.2/Python-3.7.2.tgz

解压
# tar -zxvf Python-3.7.2.tgz

建一个目录存放python3程序
# mkdir /usr/local/python3

继续阅读“Centos7.5安装python3.7.2”