|
|
//*******************************************************************
// 新しいウインドウを開く
//*******************************************************************
function NewWindow( URL, windowName ) {
var strOption = "";
var i;
var retHandle;
// 引数の3つ目からは、追加の文字列のオプションを指定する
if ( NewWindow.arguments.length > 2 ) {
for( i = 2; i < NewWindow.arguments.length; i++ ) {
if ( i == 2 ) {
strOption = NewWindow.arguments[i];
}
else {
// 繋げてオプションを完成させる
strOption = strOption + "," + NewWindow.arguments[i];
}
}
// 3つ目の引数以降があるオプションのあるウインドウ
retHandle = window.open( URL, windowName, strOption );
}
else {
retHandle = window.open( URL, windowName );
}
// 開いたウインドウの window オブジェクトを返す
return retHandle;
}
| |
|
呼び出し側
|
NewWindow( URL, windowName,
"screenx=0,screeny=0",
"width=700,height=700",
"scrollbars=1,resizable=1"
);
| |
|
|
|
|
//*******************************************************************
// ※ 完全に一致する文字列の検索が実行されます
//*******************************************************************
function AllReplace( sBase, sTarget, sValue ) {
while( sBase.indexOf( sTarget ) != -1 ) {
sBase = sBase.replace( sTarget, sValue )
}
return sBase;
}
//*******************************************************************
// ※ 大文字と小文字を区別しない
//*******************************************************************
function AllReplace( sBase, sTarget, sValue ) {
var re = new RegExp(sTarget,"ig");
var sBase = sBase.replace(re, sValue);
return sBase;
}
| |
|
|
|
|
//*******************************************************************
// ユーザ関数
//*******************************************************************
function ResizeMenubar() {
if ( MenuPosition < document.body.clientWidth ) {
MenuBarUnit.style.width = document.body.clientWidth
}
}
| |
|
|
|