ch8-10.htm

来自「《XML语言及应用》作者华铨平—examples」· HTM 代码 · 共 35 行

HTM
35
字号
<HTML>
<HEAD>
    <TITLE>学生名单</TITLE>
</HEAD>
<BODY>
<xml id="xmldata" src="ch8-8-1.xml"></xml>
<h2 align="center">信息工程分院学生名单</h2>
<script language="vbscript">
    set rs=xmldata.recordset
	document.write("<table border='1' align='center' width='600'>")
	document.write("<thead><td bgcolor='#99ff99'>姓&nbsp;&nbsp;&nbsp;&nbsp;名:</td>")
	document.write("<td bgcolor='#3399cc'>学&nbsp;&nbsp;&nbsp;&nbsp;号:</td>")
	document.write("<td bgcolor='#cc99cc'>性&nbsp;&nbsp;&nbsp;&nbsp;别:</td>")
	document.write("<td bgcolor='#cc99cc'>班&nbsp;&nbsp;&nbsp;&nbsp;级:</td>")
	document.write("<td bgcolor='#cc99cc'>出生年月:</td>")
	while not rs.EOF
		document.write("<tr><td bgcolor='#99ff99'>")
		document.write(rs("姓名"))
		document.write("</td><td bgcolor='#99ff99'>")
		document.write(rs("学号"))
		document.write("</td><td bgcolor='#99ff99'>")
		document.write(rs("性别"))
		document.write("</td><td bgcolor='#99ff99'>")
		document.write(rs("班级"))
		document.write("</td><td bgcolor='#99ff99'>")
		document.write(rs("出生年月"))
		document.write("</td></tr>")
		rs.moveNext
	wend
        rs.close
        set rs=nothing
	document.write("</table>")
	</script>
</BODY>
</HTML>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?