1. ページへのリンク
<input type="button" name="送信" value="OK"
onclick="location.href='ファイル名.html'" />
2. 帰還(撤退に相当)
<input name="送信2" type="ボタン"
onclick="location.href='javascript:history.go(-1);'" value="Return" />
3. 新しい Web ページを開きます
<input type="button" name="Submit2" value="OK"
onclick="window.open('filename.html')" />
4. 枠線のない新しいウィンドウを開きます
<input type="button" name="Submit2" value="OK" onclick="javascript:window.open('filename.html','','width=720,height=500,resizable=yes,scrollbars=はい、ステータス = いいえ')" />
5. 別のページをポイントしながら新しい Web ページを開きます
<input type="button" name="Submit2" value="OK" onclick="window.open('filename.html');location.href='http://www.cxybl.com'" />
6. 別のページをポイントしているときに、枠線のない新しいウィンドウを開きます。
<input type="button" name="Submit2" value="OK" onclick="javascript:window.open('http://www.cxybl.com','','width=720,height=500, resizable=yes,scrollbars=yes,status=no'); window.location='filename.html';" />
7. ボタンをクリックして、確認アラートウィンドウをポップアップ表示します。
方法 1:
<input type="button" name="Submit1" value="OK"
onClick="alert('送信を確認しますか?');location.href= 'filename.html';return false;" >
方法 2:
<input type="button" name="Submit2" value="OK"
onClick="if (confirm('提出を確認しますか?'))location.href= 'filename.html';return false;" >