最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
php 兼容多浏览器ActiveXObject创建方法
时间:2011-03-06 编辑:简简单单 来源:一聚教程网
function $(id)
{
return xxkf_obj(id);
}
function create_xmlhttp(){
var obj=false;
/*@cc_on @*/
/*@if (@_jscript_version >= 5)
// jscript gives us conditional compilation, we can cope with old ie versions.
// and security blocked creation of the objects.
try {
obj = new activexobject("msxml2.xmlhttp");
} catch (e) {
try {
obj = new activexobject("microsoft.xmlhttp");
} catch (e) {
obj = false;
}
}
@end @*/
if (!obj && typeof xmlhttprequest!='undefined') {
try {
obj = new xmlhttprequest();
} catch (e) {
obj=false;
}
}
if (!obj && window.createrequest) {
try {
obj = window.createrequest();
} catch (e) {
obj=false;
}
}
return obj;
}
function ajax_open_url(url,result_func)
{
xmlhttp=create_xmlhttp();
xmlhttp.open("get",url,true);
xmlhttp.onreadystatechange=result_func;
xmlhttp.send(null);
}
-
上一个: js 仿qq客服源代码
-
下一个: iframe框架应用
相关文章
- HTML简单购物数量小程序代码展示 10-31
- html canvas实现弹幕功能 10-31
- HTML中空格表示的意义 10-31
- html area标签解读 10-31
- html使用表单标签实现注册页面代码展示 10-31
- 使用HTML截图并保存为本地图片的代码展示 10-31