「フォルダを開く」の版間の差分

MSY-07 (トーク | 投稿記録)
セクションの追加
MSY-07 (トーク | 投稿記録)
ソースコード: ソースコードの整形
10行目: 10行目:
<syntaxhighlight lang="javascript">
<syntaxhighlight lang="javascript">
// フォルダを開く.js r2
// フォルダを開く.js r2
var shell = new ActiveXObject("WScript.Shell")


if (document.FullName == "")
var shell = new ActiveXObject("WScript.Shell");
{
 
    shell.Run('explorer "' + shell.SpecialFolders("Desktop") + '"')
if (document.FullName == "") {
}
shell.Run('explorer "' + shell.SpecialFolders("Desktop") + '"');
else
} else {
{
shell.Run('explorer /select, "' + document.FullName + '"');
    shell.Run('explorer /select, "' + document.FullName + '"')
}
}
</syntaxhighlight>
</syntaxhighlight>
スポンサーリンク