易截截图软件、单文件、免安装、纯绿色、仅160KB

javascript读取xml

有一个xml文件,格式如下
XML code:
<?xml version="1.0" ?>
<posts>

<post id="1">
<datetime>2010/2/16 20:59:38</datetime>
<content>this is post1</content>
</post>

<post id="1">
<datetime>2010/2/16 20:59:30</datetime>
<content>this is post2</content>
</post>

.........................
.........................
</posts>


现在要读取这个xml,并返回一个字符串,格式为"|this is post1|2010/2/16 20:59:38||this is post2|2010/2/16 20:59:30||......"

该如何写?本人不会并且没有打算学javascript,只是有急用,请直接给一个写好的函数,不用讲原理,谢谢!
http://www.jb51.net/article/19014.htm


相关问答:

如何用javascript在页面中动态更新某一块的内容?

我的源文件如下:
<html>
<head> <title>show picture </title>
<script>
function change(fileName)
    {
     
    ......

JavaScript正则表达式

 
问题内容:判断顺序号列及子序号列必须为数字。
<td><div align="center"><input type="text" name="xuHao${g+1}" class="inputW" value="& ......

jsp中获取JavaScript中的变量

jsp页面1中:
我定义了一个变量flag
<script language="javascript"> var flag=1;</script>
jsp页面2中:
在此页面中想获取flag这个变量
<% String flag=request.getParameter(" ......

关于JavaScript的prototype和instanceof

JScript code:

function C1(){}
function C2(){}
C2.prototype=new C1();
function C3(){}
C3.prototype=new C2();
var obj=new C3();
function C4(){}
C3.prototype=new C4();
alert(obj insta ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号