ホームページでボタン表示

ボタンにリンクをつける

下記のタグをホームページの表示したいところにコピーして下さい。黄色の部分を変えて下さい。

<input type="button" onclick="location.href='リンク先url'"value="リンク文字">


新窓で開きます ↓↓

<input type="button" onclick="window.open('リンク先url')" value="リンク文字">



<button></button>タグを使う


<button type="button"onclick="location.href='リンク先url'">リンク文字</button>



↓↓ カラー付き 新窓で開きます
<button type="button"onclick="window.open('リンク先url')"style="background-color:salmon;"
>リンク文字</button>



↓↓ 立体的、カラー付き 新窓で開きます
<button type="button"onclick="window.open('リンク先url')" style="border-width:4; background-color:#ccccff;"
>リンク文字</button>



オンマウスで背景色が変わるボタンのリンク
<button></button>タグ すべて新窓で開きます。
<button>タグはボタン上のフォントやサイズの変更、画像の表示、またそれらを組み合わせたりすることができます。

<button type="button"onclick="window.open('リンク先ur')" style="background-color:最初の背景色;"
onmouseover="this.style.background='マウスが触れた時の背景色'"
onmouseout="this.style.background='マウスが離れた時の背景色'">リンク文字</button>



↓↓ サイズを変更
<button type="button" onclick="window.open('リンク先url')"style="background-color:最初の背景色;width:200px;height:28px;"
onmouseover="this.style.background='マウスが触れた時の背景色'"
onmouseout="this.style.background='マウスが離れた時の背景色'">リンク文字</button>



↓↓ ボタン・フォントのサイズを変更 立体的ボタンに変更
<button type="button"onclick="window.open('リンク先url')"style="border-width:4;background-color:最初の背景色;width:250px;height:40px;"
onmouseover="this.style.background='マウスが触れた時の背景色'"
onmouseout="this.style.background='マウスが離れた時の背景色'">リンク文字 <font size="4">リンク文字</font></button>



画像を使ったボタンでリンク
すべて新窓で開きます

<button type="button"onclick="window.open('リンク先url')"><img src="画像のアドレス" width="画像の幅" height="画像の高さ" border="0"></button>



↓↓ 背景色を指定する
<button type="button"onclick="window.open('リンク先url')"style="border-color:枠線の色;background-color:背景色" ><img src="画像のアドレス" width="画像の幅" height="画像の高さ" border="0"></button>



↓↓ 画像を使ったボタンに文字を入れる

<button type="button"onclick="window.open('リンク先url')" style="background:url(画像のアドレス);border:1px solid 枠線の色;height:画像の高さ;width:画像の幅;background-color:背景色"><font size="文字の大きさ" color="文字の色">クリック</font></button>





●当サイトのソースは、IE6.0+のみ動作確認をしております。 それ以外のブラウザ、特にネットスケープでは正しく作動しない場合がございます。ご了承下さい。


★skip ページtop

ボタン表示



ホームページを小粋に
css
java
home