【发布时间】:2012-05-05 05:47:10
【问题描述】:
在使用 javascript 打开新窗口时遇到问题。在 Chrome 和 Firefox 中这很好用,但是 IE 给出了错误的 url。
链接位于这样的页面上: www.CORRECTURL.com/SEOKEYWORD/SONGID/SONGNAME.html
链接:
<a href="javascript:void(0)" onclick="window.open('extraListen.php?visa=<?php echo($songID); ?>','welcome','toolbars=1, scrollbars=1, location=1, statusbars=1, menubars=1, resizable=1, width=748, height=660, left = 300, top = 100')">Listen</a>
在 chrome/firefox 中打开:http://www.CORRECTURL.com/extraListen.php?visa=19 在 IE 中打开:http://www.CORRECTURL.com/SEOKEYWORD/SONGID/extraListen.php?visa=19
在链接中添加“seokeyword”和“songid”时,无法找到新页面,但我不明白IE如何在url和chrome中添加这个,firefox没有!??
顺便说一句,我有以下 htaccess:
Options +FollowSymLinks
RewriteEngine on
RewriteRule midsommarvisor/(.*)/(.*)\.html$ index.php?visa=$1&midsommarvisa=$2 [L]
RewriteRule sitemap\.xml sitemap.php [L]
RewriteRule rss\.xml rss.php [L]
RewriteRule (.*)/(.*)\.html$ index.php?fel=$1&page=$2 [L]
RewriteRule (.*)\.html$ index.php?page=$1
我不知道从哪里开始......
【问题讨论】:
-
在您的网址可能会修复它之前放置一个正斜杠
/...window.open('/extraListen.php?visa=<?php echo($songID); -
完美!!这么简单的事情,我错过了,非常感谢!
标签: javascript internet-explorer .htaccess url window.open