[英]Get HTML content from page rendered by javascript
Is there any solution for receive html content from page, where source code has been rendered by javascript? 是否有任何解决方案可用于从页面接收html内容,而其中的源代码已由javascript呈现? I want to use this content in my C# app. 我想在我的C#应用程序中使用此内容。 I used WebForm, but there is no result... I'm writting external dll (no console or windows application) 我使用了WebForm,但是没有结果...我正在编写外部dll(没有控制台或Windows应用程序)
Any ideas? 有任何想法吗?
something like this? 这样的东西?
console.log(document.getElementsByTagName('html')[0].innerHTML);
or 要么
document.documentElement.outerHTML
per dan 每丹
if you want to get the html code on the client (javascript) follow @kery answer, and if you need the html code of a page on the server side (c#) maybe you can use something like that: 如果要在客户端(javascript)上获取html代码,请遵循@kery答案,并且如果需要服务器端(c#)上的页面的html代码,则可以使用以下方法:
http://www.codeproject.com/Questions/204778/Get-HTML-code-from-a-website-C http://www.codeproject.com/Questions/204778/Get-HTML-code-from-a-website-C
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.