Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/424.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
Javascript 未定义但存在的_Javascript_Object_Undefined - Fatal编程技术网

Javascript 未定义但存在的

Javascript 未定义但存在的,javascript,object,undefined,Javascript,Object,Undefined,这是我的密码: js 输出: banner 300 avatar  undefined 输出良好。问题在于不打断空格字符,您可以改进引号中的代码包装: <div class="hexagon-wrap" style="height:<?php echo $this->outterHeight;?>px; width:<?php echo $this->outterWidth;?>px" <?php if($this->htmlOptions)

这是我的密码:

js

输出:

banner 300 avatar  undefined
输出良好。

问题在于不打断空格字符,您可以改进引号中的代码包装:

<div class="hexagon-wrap" style="height:<?php echo $this->outterHeight;?>px; width:<?php echo $this->outterWidth;?>px"
<?php
if($this->htmlOptions) {
    foreach ($this->htmlOptions as $key => $value) {
        echo $key . "='" . $value . "' ";
    }
}
?>

共享定义了
数据编辑
属性的HTML。否则我们无法帮助您,因为我们没有水晶球:不要在
每个
循环中声明优先级
对象
。@MarcosPérezGude,完成@克里斯蒂,我会改变的!查看生成的HTML。它正在制作类似于
的东西,显然已经坏了。谢谢!这就是问题所在!不客气,因为您共享了整个代码,我们可以帮助您。下次记住;)期待很快与您见面!请注意,只有在
$value
从不包含引号的情况下,这种方法才能可靠地工作。我认为他还可以将
echo
语句编写为
echo“{$key}='{$value}'”
,以提高可读性。
array('data-edit' => 'avatar')
banner 300 avatar  undefined
priorities['avatar']; // ouput is 301
<div class="hexagon-wrap" style="height:<?php echo $this->outterHeight;?>px; width:<?php echo $this->outterWidth;?>px"
<?php
if($this->htmlOptions) {
    foreach ($this->htmlOptions as $key => $value) {
        echo $key . "='" . $value . "' ";
    }
}
?>