<script type="text/javascript" src="popup.js"></script>■ソース(リンクの書き方)
<a href="popup.html" class="popup">popup windowを開く</a>
.popup {■画像(i_blank.gif)
background: url(i_blank.gif) no-repeat 100% 2px;
padding-right:16px;
}
window.onload=autoPOP;function autoPOP()
{
var x = document.getElementsByTagName('a');
for (var i=0;i<x.length;i++)
{
if (x[i].getAttribute('className') == 'popup' || x[i].getAttribute('class') == 'popup')
{
x[i].onclick = function () {
return winOpen(this.href)
}
x[i].title += '別窓で開きます';
}
}
};
function winOpen(url) {
window.open(
url,
'popup',
'width=500,height=350,scrollbars=0,resizable=1'
);return false;
};