View file flud/js/smyle.php

File size: 471B
<script>
function smyle(_obj_name, _text)
{
var area=document.getElementsByName(_obj_name).item(0);
if ((area.selectionStart)||(area.selectionStart=='0'))
{
  var p_start=area.selectionStart;
  var p_end=area.selectionEnd;
  area.value=area.value.substring(0,p_start)+_text+area.value.substring(p_end,area.value.length);
}
else
{

if (document.selection)
{
  area.focus();
  sel=document.selection.createRange();
  sel.text=_text;
}
}

}

</script>