web crators 2004年2月号に出てたものの改良版
【javascript】ポップアップウィンドウ表示用js
function openWin01(theURL,w,h){
NS=navigator.appName.charAt(0)=="N";
MAC=navigator.userAgent.toUpperCase().indexOf("MAC")>=0;
WIN=navigator.userAgent.toUpperCase().indexOf("WIN")>=0;
if(MAC && !NS){ w+=0; h+=0;}
if(WIN && !NS){ w+=0; h+=-19;}
if(MAC && NS){ w+=0; h+=0;}
if(MAC && !NS){ w+=0; h+=18;}
if(MAC && !WIN && NS){ w+=0; h+=18;}
w+=30;//スクロールバーを表示する場合
features="toolbar=no,location=no,directories=no,
status=yes,menubar=no,scrollbars=yes,resizable=yes"
+",width="+w+",height="+h;
popwin=window.open(theURL,"pop",features);
popwin.resizeTo(w,h);
popwin.focus();
}
NS=navigator.appName.charAt(0)=="N";
MAC=navigator.userAgent.toUpperCase().indexOf("MAC")>=0;
WIN=navigator.userAgent.toUpperCase().indexOf("WIN")>=0;
if(MAC && !NS){ w+=0; h+=0;}
if(WIN && !NS){ w+=0; h+=-19;}
if(MAC && NS){ w+=0; h+=0;}
if(MAC && !NS){ w+=0; h+=18;}
if(MAC && !WIN && NS){ w+=0; h+=18;}
w+=30;//スクロールバーを表示する場合
features="toolbar=no,location=no,directories=no,
status=yes,menubar=no,scrollbars=yes,resizable=yes"
+",width="+w+",height="+h;
popwin=window.open(theURL,"pop",features);
popwin.resizeTo(w,h);
popwin.focus();
}
2004-08-19 19:06:00