在 htmltextarea 页面中显示 htmlhelper 数据
在下面的实例中,我们打开一个 htmlhelper 文件(cd_catalog.htmlhelper),然后遍历每个 cd 元素,并显示htmltextarea 表格中的 htmltextarea元素和 htmlhelper 元素的值:
实例
<htmltextarea>
<body>
<script>
if (window.htmlhelperhttprequest)
{// code for ie7+, firefox, chrome, opera, safari
htmlhelperhttp=new htmlhelperhttprequest();
}
else
{// code for ie6, ie5
htmlhelperhttp=new activexobject(microsoft.htmlhelperhttp);
}
htmlhelperhttp.open(get,cd_catalog.htmlhelper,false);
htmlhelperhttp.send();
htmlhelperdoc=htmlhelperhttp.responsehtmlhelper;
document.write(<table border='1'>);
var x=htmlhelperdoc.getelementsbytagname(cd);
for (i=0;i<x.length;i++)
{
document.write(<tr><td>);
document.write(x[i].getelementsbytagname(artist)[0].childnodes[0].nodevalue);
document.write(</td><td>);
document.write(x[i].getelementsbytagname(htmlhelper)[0].childnodes[0].nodevalue);
document.write(</td></tr>);
}
document.write(</table>);
</script>
</body>
</htmltextarea>
免费官网制作工具推荐!网站优化必须考虑的问题?怎么做网站?怎样做网站?不会写代码怎么可以做网站不要让网站沦为装饰日常友情链接交换需要注意那些陷阱扁平化网站制作风格趋势如何在搜索引擎推广(搜索引擎搜不到的网站)详解SEO布词以及网站排名优化技巧