Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/ssh/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何在html5混合应用程序中添加webview,就像我们在本机应用程序中添加webview一样?_Html - Fatal编程技术网

如何在html5混合应用程序中添加webview,就像我们在本机应用程序中添加webview一样?

如何在html5混合应用程序中添加webview,就像我们在本机应用程序中添加webview一样?,html,Html,如何在html5混合应用程序中添加webview,就像我们在本机应用程序中添加webview一样 请不要对在webview中包装html5应用程序并将其添加为本机应用程序感到困惑 我需要的是在我的html5应用程序中添加一个web视图,其中显示url内容。如果您想在页面中显示另一个url的内容,只需使用iframe: <body> <p>My stuff</p> <iframe src="url_to_load"></ifra

如何在html5混合应用程序中添加webview,就像我们在本机应用程序中添加webview一样

请不要对在webview中包装html5应用程序并将其添加为本机应用程序感到困惑


我需要的是在我的html5应用程序中添加一个web视图,其中显示url内容。

如果您想在页面中显示另一个url的内容,只需使用
iframe

<body>
    <p>My stuff</p>
    <iframe src="url_to_load"></iframe>
</body>

我的东西


请注意,
WebView
是Cocoa框架的一类,它是用objective-c编写的,允许您构建Mac应用程序。您不能将其与Html一起使用

试图使用iframe。。但有些网页被打开,有些网页如谷歌显示一个空白屏幕。这是iframe的问题吗?那是因为CORS。简而言之,您不能从其他域调用特定域。如果您想要访问的服务器是您的,您可以修改此行为设置,并添加一些HTTP头。请看一下这份文件