<script type="text/javascript">
var windows = [];
function conf() {
var rand_no_c = Math.random();
var con = rand_no_c.toString();
var_win = 'child'+con.substring(2);
windows[var_win] = window.open('child.aspx',var_win,'width=1100,height=700,left=50,top=20,status=0');
}
function closewindow() {
for(w in windows) {
if(!windows[w].closed) {
windows[w].close();
}
}
}
</script>
<style type="text/css">
{margin: 0;padding: 0;}
</style>
</head>
<body>
<div>
<button type="button" onclick="conf();">open child window</button>
<button type="button" onclick="closewindow();">close all windows</button>
</div>
</body>
</html></script>
This Will Give You An Idea