Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/74.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
Php 通过iframe更改元标记_Php_Jquery_Html - Fatal编程技术网

Php 通过iframe更改元标记

Php 通过iframe更改元标记,php,jquery,html,Php,Jquery,Html,需要更改元标记 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 通过iframe在个人域上访问的外部网站的text/html到text/plain 代码: html,body,div,iframe{margin:0;padding:0;height:100%;} iframe{显示:块;宽度:100%;边框:无;} 如果您需要更改更多,您可以尝试以文本形式获取此网站。解析它,更改标记,然

需要更改元标记

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

通过iframe在个人域上访问的外部网站的text/html到text/plain

代码:


html,body,div,iframe{margin:0;padding:0;height:100%;}
iframe{显示:块;宽度:100%;边框:无;}

如果您需要更改更多,您可以尝试以文本形式获取此网站。解析它,更改标记,然后使用src=“mydomain/Parse.php”作为iframe插入

或者更简单的方法,您可以使用JQuery:

$("#iframe").contents().find('meta[http-equiv="Content-Type"]').attr('content', 'text/plain; charset=utf-8');

文档中的更多信息:

如果您需要更改更多内容,则可以尝试以文本形式获取此网站。解析它,更改标记,然后使用src=“mydomain/Parse.php”作为iframe插入

或者更简单的方法,您可以使用JQuery:

$("#iframe").contents().find('meta[http-equiv="Content-Type"]').attr('content', 'text/plain; charset=utf-8');

文档中的更多信息:

@Radoslow Halicki此选项似乎不起作用。您能详细介绍一下解析选项吗?您是否已将id添加到iframe中$(“#你的"iframe"id”)@Radoslow Halicki这个选项似乎不起作用。您能详细介绍一下解析选项吗?您是否已将id添加到iframe中$(“#您的#iframe#id”)。