【问题标题】:To assign flashvars value from input value从输入值分配 flashvars 值
【发布时间】:2014-01-19 01:43:57
【问题描述】:

我正在尝试使用 javascript 将 PHP 解析的输入值中的 URL 分配给 FlashVars

<input id="feed" type="hidden" value="http://localhost/photo/" />

... other HTML code goes here ...

var flashvars = {
   feed: document.getElementById('feed').value(),

   ... other flashvars code goes here ...

}

但这似乎不起作用,有没有办法解决这个问题?谢谢。

【问题讨论】:

    标签: javascript flashvars


    【解决方案1】:

    没有(),值就不是函数。

    改变

    feed: document.getElementByID('feed').value(),
    

    feed: document.getElementByID('feed').value,
    

    【讨论】:

    • 谢谢指出,但还是不行。如果我像 feed:"localhost/photo" 那样直接分配静态字符串,但在使用 feed:document.getElementByID('feed').value 时不起作用
    • 好吧,我不得不改成 flashvars['feed'] = document.getElementById('flashvar-feed').value;
    猜你喜欢
    • 1970-01-01
    • 2014-06-26
    • 1970-01-01
    • 2021-09-26
    • 1970-01-01
    • 1970-01-01
    • 2015-01-11
    • 2015-06-14
    • 1970-01-01
    相关资源
    最近更新 更多