【发布时间】:2016-02-03 21:34:27
【问题描述】:
我的 wordpress 主页有一个来自 youtube 的嵌入视频,我想动态更改此嵌入视频,而无需编辑我的 wordpress 设置。
我尝试创建一个重定向到我的视频的自定义网页,所以我需要做的就是运行一个脚本来更改此页面的 URL,但它不起作用,有任何解决方法的线索吗?
我习惯使用以下代码进行重定向:
<!DOCTYPE HTML>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<meta http-equiv="refresh" content="1;url=http://https://www.youtube.com/watch?v=Eho8HDtkCiU">
<script type="text/javascript">
window.location.href = "http://https://www.youtube.com/watch?v=Eho8HDtkCiU"
</script>
<title>Page Redirection</title>
</head>
<body>
<!-- Note: don't tell people to `click` the link, just tell them that it is a link. -->
If you are not redirected automatically, follow the <a href='http://https://www.youtube.com/watch?v=Eho8HDtkCiU'>link to example</a>
</body>
</html>
【问题讨论】:
-
你说“但它有效”吗?
-
你认为用 iframe 在你的 wordpress 中插入那个页面吗?
标签: html wordpress video youtube