javascript跨浏览器创建XML对象
var
xmlDoc
=
null
;
function
parseXML
(
xmlUrl
)
{
try
{
//IE
xmlDoc
=
new
ActiveXObject
(
"Microsoft.XMLDOM"
);
xmlDoc
.
async
=
false
;
xmlDoc
.
load
(
xmlUrl
);
}
catch
(
e
)
{
try
{
//
Firefox
,
Mozilla
,
Opera
,
etc
.
xmlDoc
=
document
.
implementation
.
createDocument
(
""
,
""
,
null
);
xmlDoc
.
async
=
false
;
xmlDoc
.
load
(
xmlUrl
);
}
catch
(
e
)
{
try
{
//
google
,
Safari
var
xmlhttp
=
new
window
.
XMLHttpRequest
();
xmlhttp
.
open
(
"GET"
,
xmlUrl
,
false
);
xmlhttp
.
send
(
null
);
xmlDoc
=
xmlhttp
.
responseXML
.
documentElement
;
}
catch
(
e
){
alert
(
e
.
message
+
" EROR"
);
return
;}
}
}
}
相关文档:
第二章:ECMAScript基础
1.当函数无明确返回值时,返回的也是值undefined
function testFunc(){}
alert(testFunc()==undefined);
2.typeof(null)=='object' //true,null可以解释为对象占位符
3.undefined 是声明了变量但未对其初始化时赋予该变量的值,null则用于表示尚未存在的对象。
alert(nu ......
Identifier Resolution Performance 标识符识别性能
Identifier resolution isn't free, as in fact no computer operation really is without some sort of performance overhead. The deeper into the execution context's scope chain an identifier exists, the slower it is to access for ......
Nested Members 嵌套成员
Since object members may contain other members, it's not uncommon to see patterns such as window.location.href in JavaScript code. These nested members cause the JavaScript engine to go through the object member resolution process each time a dot is ......
from:http://www.xland.com.cn/article/7/81/0804/28778.htm
本类实现:
数据库信息导出:word,excel,json,xml,sql
数据库恢复:从sql,从文件
具体用法:
首先新建测试用数据库mytest,然后在里面建张表
PHP代码:
以下是代码片段:
--
-- 表的结构 `test`
--
CREATE TABLE `test` (
`id ......