问题是当我点击弹出窗口中的保留链接时
弹出窗口是重定向到另一个链接的窗口
如何将下面圈出的网址重定向到 Admin/reserve.php?
这是我的代码:
<script type="text/javascript">
function openWin()
{
myBtn=window.open('','','width=200,height=200');
myBtn.document.write("<p>Lot Name: Esperanza</p>");
myBtn.document.write("<p>Lot Price: P800,000</p>");
myBtn.document.write("<p>Lot Size: 50 sq. metres</p>");
myBtn.document.write('<a href="Admin/reserve.php">Reserve</a>');;
myBtn.focus();
}
</script>
最佳答案
试试这个
window.name = "_oldWindow";
myBtn=window.open('','_NewWindow ','width=200,height=200');
myBtn.document.write("<p>Lot Name: Esperanza</p>");
myBtn.document.write("<p>Lot Price: P800,000</p>");
myBtn.document.write("<p>Lot Size: 50 sq. metres</p>");
myBtn.document.write('<a href="Admin/reserve.php" target="_oldWindow">Reserve</a>');;
myBtn.focus();
关于javascript - 使用 Javascript 中的弹出窗口重定向到另一个 url,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22317494/