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();
相关文档:
javascript函数的定义
1:调用关键字function来构造,如:
function distance(x1,x2,y1,y2)
{
var dx=x2-x1;
var dy=y2-y1;
return Math ......
1,不带参数的事件:
两种方式:直接给对象添加事件,节点添加事件
例如给一个id为tab1的添加onclick事件
第一种情况:
var
t
=
document.getElementById(
"
NewTitle
"
);
t.onclick
=
function
showmsg(){
alert(
'
Hello!Wor ......
Beginning JavaScript with Dom Scripting and Ajax
深入浅出JavaScript
图灵程序设计丛书
web开发系列
作者 Christian Heilmann [德]
第一章 JavaScript入门
本章主要介绍:
* JavaSript是什么以及它的功用
......
window.parent与window.opener的区别 javascript调用主窗口方法
1: window.parent 是iframe页面调用父页面对象
举例:
a.html
Html代码 <html>
<head><title>父页面</title></head>
<body>
&nb ......
function $import(path,type,title,idname){
var s,i;
if(type=="js"){
&nb ......