“Откройте новый окно JavaScript” Ответ

JavaScript Откройте новое окно

<a onclick="window.open(document.URL, '_blank', 'location=yes,height=570,width=520,scrollbars=yes,status=yes');">
Open New Window
</a>
Friendly Hawk

JavaScript Откройте новое окно с HTML -контентом

var newWin = open('url','windowName','height=300,width=300');
newWin.document.write('html to write...');
Comfortable Cheetah

Откройте новый окно JavaScript

window.open("LINK-HERE");
Undefined

Откройте новое окно в сценарии Java

<script type="text/javascript">
var windowObjectReference = null; // global variable

function openFFPromotionPopup() {
  if(windowObjectReference == null || windowObjectReference.closed)
  /* if the pointer to the window object in memory does not exist
     or if such pointer exists but the window was closed */

  {
    windowObjectReference = window.open("http://www.spreadfirefox.com/",
   "PromoteFirefoxWindowName", "resizable,scrollbars,status");
    /* then create it. The new window will be created and
       will be brought on top of any other window. */
  }
  else
  {
    windowObjectReference.focus();
    /* else the window reference must exist and the window
       is not closed; therefore, we can bring it back on top of any other
       window with the focus() method. There would be no need to re-create
       the window or to reload the referenced resource. */
  };
}
</script>

(...)

<p><a
 href="http://www.spreadfirefox.com/"
 target="PromoteFirefoxWindowName"
 onclick="openFFPromotionPopup(); return false;"
 title="This link will create a new window or will re-use an already opened one"
>Promote Firefox adoption</a></p>
Open Owl

JavaScript Open Window

window.open('page2.html')
Yasin

Откройте новое окно в сценарии Java

<script type="text/javascript">
var windowObjectReference = null; // global variable

function openRequestedPopup(url, windowName) {
  if(windowObjectReference == null || windowObjectReference.closed) {
    windowObjectReference = window.open(url, windowName,
           "resizable,scrollbars,status");
  } else {
    windowObjectReference.focus();
  };
}
</script>

(...)

<p><a
 href="http://www.spreadfirefox.com/"
 target="PromoteFirefoxWindow"
 onclick="openRequestedPopup(this.href, this.target); return false;"
 title="This link will create a new window or will re-use an already opened one"
>Promote Firefox adoption</a></p>
Open Owl

Ответы похожие на “Откройте новый окно JavaScript”

Вопросы похожие на “Откройте новый окно JavaScript”

Больше похожих ответов на “Откройте новый окно JavaScript” по JavaScript

Смотреть популярные ответы по языку

Смотреть другие языки программирования