View Full Version : Apply "Bold" to a selected text in a DIV using Javascript

02-10-2011, 06:03 AM
Can some1 help me at this, i am very new to javsciprt and HTML things, so as the title says a simple bold to the selected text in a div is what i need.

below is the div area i have, so how do it??

<TD colspan="25" width="525px" style="text-overflow: ellipsis; overflow: hidden;">
<input type="hidden" $acmForms.bindText("casecomments") />
<div #if (!$acmForms.getFormAttributes().isReadOnly())
onKeyUp="dairy_limitTextArea(this, 4000)"
onKeyDown="dairy_limitTextArea(this, 4000)"
id="spell_casecomments" style="width:800px; height:220px; overflow: auto; border: 1px solid #bdcee5;">