2012-09-27 33 views
0

我有我們辦公室的熱點地圖。熱點可以被點擊並彈出一個小窗口,但帶有地圖的較大頁面會移回原始位置。如何讓我的大地圖頁面保持在瀏覽器中的相同位置?打開新窗口保存原始頁面位置

<html> 
<title>Office Map</title> 


<div> 
<img src="Office.jpg" width="2550" height="1650" usemap="#Map" class="mapper"> 
</div> 

<map name="Map"> 
<!--MKTP51--> 
<area shape="rect" title="MKTP51" coords="1856,391,1874,420" alt="MKTP51" a href="#" onClick="window.open('PrinterPages/mktp51.html','mywindow','width=400,height=200,toolbar=no,location=no,directories=no,statu s=no,menubar=no,scrollbars=no,copyhistory=no,resizable=no')"> 
<!--MKTP40--> 
<area shape="rect" title="MKTP40" coords="772,322,790,358" alt="MKTP40" a href="#" onClick= "window.open('PrinterPages/mktp40.html','mywindow','width=400,height=200,toolbar=no,location=no,directories=no,statu s=no,menubar=no,scrollbars=no,copyhistory=no,resizable=no')"> 

在此先感謝您。

回答

1

嘗試將return false;放在onclick屬性的末尾。 (請注意,您將需要把;在當前語句的結束)

這應該停止標準的鏈接處理,並停止它會在頁面由於href="#"

只是爲了啓動確認時,endof的onclick屬性應該是這樣的......

... resizable=no'); return false;"> 
+0

不幸的是,防止新的小窗口,從彈出所有.. – rupes0610

+0

真的嗎?我很驚訝。 'onclick'屬性的結尾應該像......'resizable = no');返回false;「' – freefaller

+0

其實這個工作!我第一次誤解了你,非常感謝你! – rupes0610

相關問題