ウインドウを開く

サンプルソース

<script language="Javascript">
<!--
function Click_Sub() {
    window.open("javatips.htm","_blank","height=200,width=400,status=yes,toolbar=no,menubar=no,location=no");
}
-->
</script>

<input type="button" value="ウインドウを開く" onclick="Click_Sub()">

解説

window.openでウインドウを開きます。

引数は順に、URL、ターゲット、パラメータです。
パラメータには、height(高さ)、height(高さ)、width(幅)、status(ステータスバーの有無)、
toolbar(ツールバーの有無)、menubar(メニューバーの有無)、locationを指定できます。

実行結果



関連する内容



Copyright (C) JavaScript@Workshop All rights reserved.