創(chuàng)建XML Http Request對象兩個的方法_PHP教程
推薦:通過PHP MYSQL實現(xiàn) 網(wǎng)站在線人數(shù)統(tǒng)計網(wǎng)站在線人數(shù)的程序代碼,后臺有MySQL(和PHP搭配之最佳組合)數(shù)據(jù)庫支持�?梢灾苯咏y(tǒng)計出網(wǎng)站當前的在線人數(shù)。 首先是創(chuàng)建MySQL(和PHP搭配之最佳組合)數(shù)據(jù)庫表。
方法一:推薦
|
// 創(chuàng)建一個布爾型變量 var xmlhttp = false; // 檢查使用的是否為IE瀏覽器 try{ // 如果JS的版本大于5 xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); alert("You are using Microsoft Internet Explorer."); }catch(e){ // 如果不是,則使用老版本的ActiveX對象 try{ // 如果使用的是IE瀏覽器 xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); alert("You are using Microsoft Internet Explorer."); }catch(e){ // 使用非IE瀏覽器 xmlhttp = false; } } // 如果使用的是IE非瀏覽器 if(!xmlhttp && typeof XMLHttpRequest != 'undefined'){ xmlhttp = new XMLHttpRequest(); alert("You are not using Microsoft Internet Explorer."); } |
方法二:
|
var xmlhttp; |
分享:《PHP設計模式介紹》關于本書說明中國站長站關于《PHP設計模式介紹》的說明 《PHP設計模式介紹》一書的英文原名是“ Guide.to.PHP.Design.Patterns ”,此書由Marco Tabini & Associates, Inc.出版,原作者是Ja
- 相關鏈接:
- 教程說明:
PHP教程-創(chuàng)建XML Http Request對象兩個的方法
。