如何創建一些JavaScript執行以下操作 - 當用戶點擊「大膽」按鈕,選中的文本得到一個「<b>」和「</B > 「纏住它。添加<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腳本
你爲什麼不使用預發[富文本編輯器(http://www.webdesignerdepot.com/2008/12/20-excellent-free-rich-text-editors/)? – egasimus
爲什麼要重新發明輪子?谷歌「PHP JavaScript的富文本編輯器」,並採取你的選擇 – GDP
@egasimus,這就是主意。但是,這個來源太舊 – Alexander