4
<a href="page.html?iframe=true&amp;width=700&amp;height=100%&amp;myVar=text" rel="prettyPhoto">Click Me</a>

在 js 脚本中:

$('a[rel*=prettyPhoto]').prettyPhoto({
        keyboard_shortcuts: false,
        social_tools: false,
        deeplinking: false
    });

在 page.html 中我无法访问 myVar。帮助?

  • 在这里找到了类似的问题,但也没有答案。
4

1 回答 1

2

解决方案:您要传递的 url 参数应该在“iframe”变量之前。例如。:

page.html?myVar=text&iframe=true&width=700&height=100%
于 2012-12-27T20:11:52.093 回答