<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
<xsl:template match="Type">
<html>
<head>
<title/>
</head>
<body>
<xsl:for-each select="type">
<input type="checkbox" id="{@id}" name="{@name}" value="{@name}"/>
<xsl:value-of select="@name"/>
</xsl:for-each>
</body>
</html>
</xsl:template>
</xsl:stylesheet>---------------------
试一试
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
<xsl:template match="Type">
<html>
<head>
<title/>
</head>
<body>
<xsl:for-each select="type">
<input type="checkbox" id="{@id}" name="{@name}" value="{@name}"/>
<xsl:value-of select="@name"/>
</xsl:for-each>
</body>
</html>
</xsl:template>
</xsl:stylesheet>---------------------
试一试
解决方案 »
- js测试时间轴,求高手赐教。
- cmd.Execute() 报错行只有这么一段代码,如何调试错误在哪
- 新手啊,入门问题,向组织求救!
- JS拖动选中文字添加到指定编辑框中
- javascript读取文本文件,支持FireFox浏览器
- JS判断自己被页面加载后,是否可以自我销毁?
- javascript byte string
- 关于web表单设计器
- 求人帮解释下这个问题
- 执行js方法 返回underfind,没办法获取返回值,求大家帮帮我,弄了一下午了。
- 求 IE 4.0 对 HTML,javascript , css , XML/XSLT 等 支持的资料
- 给hidden的VALUE属性附值,最大能附多少KB??
<?xml version="1.0" ?>
......
<Type id="39">
<type id="01" name="未查"></type>
<type id="02" name="正常"></type>
<type id="03" name="异常"></type>
<type id="04" name="其它"></type>
</Type>
......
我的控件checkbox1下的项为Type的id为“39”下所有项,请问该怎么办了???
<List>
<Type id="39">
<type id="01" name="未查"></type>
<type id="02" name="正常"></type>
<type id="03" name="异常"></type>
<type id="04" name="其它"></type>
</Type>
<Type id="32">
<type id="01" name="未查"></type>
<type id="02" name="正常"></type>
<type id="03" name="异常"></type>
<type id="04" name="其它"></type>
</Type>
<Type id="33">
<type id="01" name="未查"></type>
<type id="02" name="正常"></type>
<type id="03" name="异常"></type>
<type id="04" name="其它"></type>
</Type>
</List>
------------------------------------------------------
HTML文件:
<html>
<head>
<title> New Document </title>
</head>
<body>
<table>
<tr>
<td id='test' name='test'></td>
</tr>
</table>
</body>
</html>
<script language="JavaScript">
var dom = new ActiveXObject("MSXML.DOMDocument");
dom.load("src.xml");
var oNode = dom.selectSingleNode("//List/Type[@id='39']");
var LstObj = document.all["test"];
for(var i=0;i<oNode.childNodes.length;i++)
{
LstObj.innerHTML+='<input type="checkbox" name="" value="'+oNode.childNodes[i].attributes[0].value+'">'+oNode.childNodes[i].attributes[1].value;
}</script>