簡體   English   中英

如何基於Javascript中的某個位置彈出某個大小的窗口?

[英]How to popup window of a certain size based on a certain position in Javascript?

假設我有一個頁面,該頁面的iframe位於400px x 400px的頁面上。 是否可以單擊一個按鈕,以使iframe的內容在新窗口中彈出,使其保持與iframe相同的大小,並位於iframe原始頁面上的區域的正上方?

您可以這樣嘗試:-

<a href="/abc.php" 
 onclick="window.open(this.href,'targetWindow','toolbar=no,
location=no,status=no,‌​menubar=no,scrollbars=yes,resizable=yes,
 width='400px',height='400px')" />

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM