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

在js脚本:jQuery prettyPhoto:如何传递额外的GET参数?

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

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

  • 找到了相似的问题here,但它没有被回答。

回答

2

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

page.html?myVar=text&iframe=true&width=700&height=100% 
相关问题