简体   繁体   中英

Show Generated HTML on new page without saving in a file

我有从C#代码动态生成的HTML,有什么方法可以在不保存文件的情况下在新页面中显示此HTML(增加清理成本)。

var result = rg.GenerateHTML();

You can do this by using JavaScript method.

var win = window.open("", "Title", "toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, width=780, height=200, top="+(screen.height-400)+", left="+(screen.width-840));
win.document.body.innerHTML = "Pass your html here";

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM