JavaScript 读取 XML文件
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<mce:style type="text/css"><!--
table,tr,td {
background-position: center;
border-width: 1px;
border-style: solid;
border-collapse: collapse;
border-color: blue;
text-align: center;
font-size: 20px;
}
table {
width: 800px;
margin-bottom: 20px;
}
tr {
height: 40px;
}
.bordertyle {
font-family: sans-serif;
text-align: center;
}
.btn {
margin-left: 30px;
margin-right: 30px;
}
label {
font-size: 20px;
font-family: sans-serif;
}
--></mce:style><style type="text/css" mce_bogus="1">
table,tr,td {
background-position: center;
border-width: 1px;
border-style: solid;
border-collapse: collapse;
border-color: blue;
text-align: center;
font-size: 20px;
}
table {
width: 800px;
margin-bottom: 20px;
}
tr {
height: 40px;
}
.bordertyle {
font-family: sans-serif;
text-align: center;
}
.btn {
margin-left: 30px;
margin-right: 30px;
}
label {
font-size: 20px;
font-family: sans-serif;
} </style>
<mce:script language="javascript"><!--
//***********js操作XML*************
//* author:luobin *
//* Email:luobin23628@163.com *
//*********************************
/*
function loadXML(xmlFile){
var xmlDoc;
if(!window.ActiveXObject){
var parser = new DOMParser();
相关文档:
1、isPrototypeOf
isPrototypeOf是用来判断指定对象object1是否存在于另一个对象object2的原型链中,是则返回true,否则返回false。
格式如下:
object1.isPrototypeOf(object2);
object1是一个对象的实例;
object2是另一个将要检查其原型链的对象。
原型链可以用来在同一个对象类型的不同实例之间共享功能。 ......
1,不带参数的事件:
两种方式:直接给对象添加事件,节点添加事件
例如给一个id为tab1的添加onclick事件
第一种情况:
var
t
=
document.getElementById(
"
NewTitle
"
);
t.onclick
=
function
showmsg(){
alert(
'
Hello!Wor ......
Xml, xslt, xsd, xpath描述一下
XML: Extensible Markup Language扩展标记语言,用来处理结构化文档。
XSLT: XSL Transformations。用来将一种XML转换成另外一种XML文档。也可以将XML转换成XHTML或者HTML在浏览器中显示。
XSD: XML Schemas Definition。用来定义XML文档的结构。XML Schema 是DTD(Document Type Definiti ......
javascript中eval详细理解
2009-02-27 14:58
2008-04-12 00:29
首先来个最简单的理解
eval可以将字符串生成语句执行,和SQL的exec()类似。
eval的使用场合是什么呢?有时候我们预先不知道要执行什么语句,只有当条件和参数给时才知道执行什么语句,这时候eval就派上用场了。举个例子:
& ......
window.parent与window.opener的区别 javascript调用主窗口方法
1: window.parent 是iframe页面调用父页面对象
举例:
a.html
Html代码 <html>
<head><title>父页面</title></head>
<body>
&nb ......