Open a subwindow in a specified size

Explanation

HTML and style sheets don't allow you to open a subwindow in a specified size. So, use JavaScript. Specify an URL and a display width, etc. in window.open() method of JavaScript and call the method. For handling of subwindow by using JavaScript, please refer to Subwindow in JavaScript Reference.

Sample Code [Output]

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=shift_jis">
<title>Sample</title>
<script type="text/javascript"><!--
function openSubWin(w,h,swurl)
{
window.open(swurl, "sbwin", "width="+w+",height="+h);
}
// --></script>
</head>
<body>
<h1>Sample</h1>
<p>
Open a subwindow.<br>
<a href="javascript:openSubWin(320,240,'contents.html')">320x240‚ÅŠJ‚­</a><br>
</p>
</body>
</html>