我将这段代码放入索引中,加载一个新页面,然后在2秒后,移动到我的原始屏幕。
打算加载一个"music_player“,然后在2秒后,转到我的正常页面。
让播放器加载到一个新窗口中。但是代码不能正常工作,它只是替换掉了没有“Target=”的_blank“找不到原因?”
下面是代码!!
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="refresh" content="5; url=http://www.mysite.com/start.php" />
<meta http-equiv="refresh" content="3;URL=http://www.mysite.com/player.html" Target="_blank/>
</head>发布于 2010-01-14 01:17:29
根据w3schools的说法,目标不是元标签的属性。如果你想要这样的东西,你应该使用javascript。
发布于 2010-01-14 01:17:26
元刷新方法重定向当前页面-它不能用于打开新窗口。为此,您将需要javascript window.open
http://www.w3schools.com/jsref/met_win_open.asp
和setTimeout将其延迟2秒:
http://www.w3schools.com/js/js_timing.asp
发布于 2010-01-14 01:18:29
标记没有目标属性,因此不能使用它来触发新的浏览器窗口。
https://stackoverflow.com/questions/2058698
复制相似问题