<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<title>js_sample</title>
<script>
function hyouji(nakigoe){
are=window.open('','aaa','width=250,height=200');
are.document.write('<H2 align=center>'+nakigoe+'</H2>');
}
</script>
</head>
<body>
<form> ボタンを押して下さい。<br><br>
<input type="button" value=" 犬 " onClick="hyouji('わん!わん!')">
<input type="button" value=" 猫 " onClick="hyouji('ニャン!ニャン!')">
</form>
</body>
</html>
(押すボタンに応じ鳴き声を表示します)
【参考サイト】
HTML5の書き方