「JavaScript を実行」の版間の差分
編集の要約なし |
<source>タグを<syntaxhighlight>タグに置き換える |
||
| 2行目: | 2行目: | ||
== 置き換え版 == | == 置き換え版 == | ||
< | <syntaxhighlight lang="javascript"> | ||
// JavaScriptを実行 (置き換え版).js | // JavaScriptを実行 (置き換え版).js | ||
| 12行目: | 12行目: | ||
document.selection.Text = eval(document.selection.Text) | document.selection.Text = eval(document.selection.Text) | ||
} | } | ||
</ | </syntaxhighlight> | ||
== 挿入版 == | == 挿入版 == | ||
< | <syntaxhighlight lang="javascript"> | ||
// JavaScriptを実行.js (挿入版) | // JavaScriptを実行.js (挿入版) | ||
| 26行目: | 26行目: | ||
document.selection.Text = document.selection.Text + ' => ' + eval(document.selection.Text) | document.selection.Text = document.selection.Text + ' => ' + eval(document.selection.Text) | ||
} | } | ||
</ | </syntaxhighlight> | ||
== アウトプットバー版 == | == アウトプットバー版 == | ||
< | <syntaxhighlight lang="javascript"> | ||
// JavaScriptを実行 (アウトプットバー版).js | // JavaScriptを実行 (アウトプットバー版).js | ||
| 42行目: | 42行目: | ||
outputbar.Writeln("=> " + eval(document.selection.Text).toString()) | outputbar.Writeln("=> " + eval(document.selection.Text).toString()) | ||
} | } | ||
</ | </syntaxhighlight> | ||
スポンサーリンク