如何使用C#,asp.net在div中显示谷歌页面 [英] how to show google page in div using C#, asp.net
本文介绍了如何使用C#,asp.net在div中显示谷歌页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何使用C#,asp.net
how to show google page in div using C#, asp.net
推荐答案
在div中显示google页面您无法在<$中显示 Google 页面c $ c> div 或iFrame
等...
他们不喜欢我希望你在你的应用程序中显示他们的页面。
You can't show Google page indiv
oriFrame
etc...
They don't want you to display their page in your Application.
不。你不能在另一个div元素中嵌入一个完整的HTML文档,因为这是一个块级元素,而W3C已经定义了可以包含在其中的内容。
但是有解决方法。请按照以下步骤操作:
1.使用ajax获取文档(jQuery rocks,使用它)
2.提取<的内容;主体>元素并将其放入div元素中
3.获取< head>的所有链接和脚本元素并将它们附加到< head>现有页面的元素。
Nope. You can't embed a complete HTML document inside another div element as this is a block level element and W3C has defined what could be included inside it.
But there is a workaround. Follow these steps:
1. Get the document using ajax (jQuery rocks, use that)
2. Extract the content of the <body> element and put it inside your div element
3. Get all links and script of <head> element and append them to the <head> element of your existing page.
这篇关于如何使用C#,asp.net在div中显示谷歌页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文