XML好例子

来源:互联网 发布:南方和北方的区别知乎 编辑:程序博客网 时间:2024/05/22 16:07
<html>
<head>
<script type="text/javascript">
function movenext()
{
x=xmldso.recordset
if (x.absoluteposition < x.recordcount)
{
x.movenext()
}
}
function moveprevious()
{
x=xmldso.recordset
if (x.absoluteposition > 1)
{
x.moveprevious()
}
}
</script>
</head>
<body>
<xml src="cd_catalog.xml" tppabs=" id="xmldso" async="false"></xml>
<p>
Title:
<span datasrc="#xmldso" datafld="TITLE"></span>
<br />Artist:
<span datasrc="#xmldso" datafld="ARTIST"></span>
<br />Year:
<span datasrc="#xmldso" datafld="YEAR"></span>
</p>
<p>
<input type="button" value="Previous CD"
onclick="moveprevious()" />
<input type="button" value="Next CD"
onclick="movenext()" />
</p>
</body>
</html>
原创粉丝点击