次のことを行うための JavaScript の作成方法 - ユーザーが「BOLD」ボタンをクリックすると、選択したテキストが「<b>」と「</b>」で囲まれます。
<form name="my">
<textarea name="textarea"></textarea><br />
<input type="button" value="bold" onclick="formatText ('b');" />
<input type="button" value="italic" onclick="formatText ('i');" />
<input type="button" value="underline" onclick="formatText ('u');" />
</form>
ほとんどの Web ブラウザをサポートするための Java スクリプトの作成を手伝ってください