如何从 url 末尾的查询字符串激活厚盒

发布于 2024-08-24 19:57:00 字数 1650 浏览 6 评论 0 原文

我是编程新手,也是这个网站的新手。我有一个关于使用 Thickbox 和 jquery 在网站上显示叠加视频的快速问题。

我的问题是,我希望当有人单击电子邮件中的链接时显示叠加层。因此,链接类似于:mywebsite.com/landingpage.html#playVideo,然后访问该网页的其他人都必须单击链接才能激活叠加层。

我看过有关如何使用 js 为访问该网站的每个人播放叠加播放的文档,但不是针对 html 链接中的特定人员。

我对这方面很陌生,主要是作为一名设计师,但我熟悉基本的编程,并且知道足够的知识,不会在这种情况下让自己陷入麻烦。我的期限已经到了,任何人都可以提供帮助,我将不胜感激。我想您可以将其称为页面上厚盒中显示的一段内容的永久链接。

先感谢您...

<head>
<script type="text/javascript" src="overlay_js/jquery.js"></script>
<script type="text/javascript" src="overlay_js/thickbox.js"></script>
<script type="text/javascript"> var tb_pathToImage = "images/loadingAnimation.gif";</script>

<style type="text/css" media="screen">@import "css/thickbox.css";</style>
</head>
<body>
<h2>Video Overlay Example</h2>
<div id="videoDisplay" style="display:none;">
<!– start embed code copied directly from youTube.com –>
<object width="425" height="355">
  <param name="movie" value="http://cdn-static.viddler.com/flash/simple_publisher.swf?key=c28782d6&autoplay=t"></param>
  <param name="wmode" value="transparent"></param>
  <embed src="http://cdn-static.viddler.com/flash/simple_publisher.swf?key=c28782d6&autoplay=t" type="application/x-shockwave-flash" width="425" height="355"></embed>
</object>
<!– end embed code copied directly from youTube.com –>
</div>
<a href="#TB_inline?height=365&width=425&inlineId=videoDisplay"
  class="thickbox" title="Bill Aulet">Click here to see my video</a>
</body>
</html>

I'm new to programming, and this website. I have what is hopefully a quick question about using thickbox, and jquery to display an overlayed video on a website.

My problem is that I want to have the overlay displayed when someone clicks a link from an email. So the link would be something like: mywebsite.com/landingpage.html#playVideo and then everyone else who visits the web page has to click on a link to activate the overlay.

I've seen documentation about how to use js to have the overlay play for everyone who visits the site, but not for specific people from an html link.

I'm very new at this stuff and mostly function as a designer, but I'm familiar with basic programming and know enough to get myself in trouble in situations like this. I'm under a deadline and anything anyone can do to help would be appreciated. I guess you could call it a permalink to a piece of content displayed in thickbox on a page.

Thank you in advance...

<head>
<script type="text/javascript" src="overlay_js/jquery.js"></script>
<script type="text/javascript" src="overlay_js/thickbox.js"></script>
<script type="text/javascript"> var tb_pathToImage = "images/loadingAnimation.gif";</script>

<style type="text/css" media="screen">@import "css/thickbox.css";</style>
</head>
<body>
<h2>Video Overlay Example</h2>
<div id="videoDisplay" style="display:none;">
<!– start embed code copied directly from youTube.com –>
<object width="425" height="355">
  <param name="movie" value="http://cdn-static.viddler.com/flash/simple_publisher.swf?key=c28782d6&autoplay=t"></param>
  <param name="wmode" value="transparent"></param>
  <embed src="http://cdn-static.viddler.com/flash/simple_publisher.swf?key=c28782d6&autoplay=t" type="application/x-shockwave-flash" width="425" height="355"></embed>
</object>
<!– end embed code copied directly from youTube.com –>
</div>
<a href="#TB_inline?height=365&width=425&inlineId=videoDisplay"
  class="thickbox" title="Bill Aulet">Click here to see my video</a>
</body>
</html>

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

娇纵 2024-08-31 19:57:00

你可以使用jquery的插件 http://plugins.jquery.com/project/querystring 来获取查询字符串信息,然后调用厚盒来加载/出现在您的 $(document).ready() 事件中:-)

you can use jquery's plugin http://plugins.jquery.com/project/querystring to get the querystring information and then call the thickbox to load/appear in your $(document).ready() event :-)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文