我不断得到错误,"Error: Permission denied to access property 'document'"而我已经在我的定义X-FRAME options允许其他域名,像这样..
<?php
header('X-Frame-Options: ALLOW-FROM http://mydomain.com');
?>
Run Code Online (Sandbox Code Playgroud)
下面是iframe请求的标题,清楚地显示我已经定义允许域访问iframe但不能正常工作.我想要的是使用javascript调整iframe的大小.

这是我调整iframe高度的javascript代码.
<iframe src="http://mydomain.com/xxx/yyy" id="idIframe" onload="iframeLoaded();" allowtransparency="true" frameborder="0" width="100%" scrolling="no"></iframe>
<script type="text/javascript">
function iframeLoaded() {
var iFrameID = document.getElementById('idIframe');
if(iFrameID) {
iFrameID.height = "";
if(iFrameID.contentWindow.document.body.scrollHeight < 500) {
iFrameID.height = "500px";
} else {
iFrameID.height = iFrameID.contentWindow.document.body.scrollHeight + "px";
}
}
}
</script>
Run Code Online (Sandbox Code Playgroud)
我怎样才能做到这一点?请建议.
我有代码
$this->addValidator('Regex', false,
array('/^[A-Za-z0-9 _]*[A-Za-z0-9][A-Za-z0-9 _]*$/'));
Run Code Online (Sandbox Code Playgroud)
用于验证数据是否为字母数字但不起作用,
怎么做?
我在php中有一个小任务。我有一个简单的数组。
Array
(
[0] => 50
[1] => 100
[2] => 150
)
Run Code Online (Sandbox Code Playgroud)
是否有一个PHP内置函数可供我使用,以便它可以返回true或false,因此,如果数组已经排序或没有排序,或者对此的任何其他php脚本,没有循环。我知道使用循环和条件很容易。
我在从响应字符串中获取变量时遇到问题.我的回答是这样的:
responseText = {'page':'2','endOfPage':'yes','content':'abc'}
alert(responseText.page);
Run Code Online (Sandbox Code Playgroud)
正在返回undefined,任何人都可以建议怎么做?