首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > JavaScript >

window.open怎么展现一个dom对象

2012-02-28 
window.open如何展现一个dom对象?javascript里面一个DOMDocument对象,(或者xmlhttp.responseXML对象)里面

window.open如何展现一个dom对象?
javascript里面一个DOMDocument对象,(或者xmlhttp.responseXML对象)
里面含有stylesheet,如何通过打开一个页面来展现它?
doucment.write不行。

[解决办法]
<script language=javascript>
var wc = window.open( 'about:blank ', 'wc ');
wc.window.document.write(1);
</script>
[解决办法]
function sort(key) {
// Find the "order-by " attributes in the style sheet.
var s = document.XSLDocument.selectNodes( "*/xsl:template[@match= 'menu ']
//xsl:apply-templates/@order-by ");
// Replace the values with the new sort key.
for (var i = s.nextNode(); i != null; i = s.nextNode())
{
i.value = key;
}
// Find the subset of the document we need to update.
var d = document.XMLDocument.selectSingleNode( "story/menu ");
// Apply the style sheet to the subset, and update the display.
menu.innerHTML = d.transformNode(document.XSLDocument);
}
或许对你有用!

热点排行