קוד:
<script>
function fontname(fontname_i) {
var fontname = fontname_i.value;
if(fontname != "none") {
if(fontname == "otherfont") {
otherfont();
}
else {
document.getElementById('editor').focus();
document.execCommand('fontname',false,fontname);
document.getElementById('editor').focus();
}
}
else {
document.getElementById('editor').focus();
}
}
</script>
<span>
<select id="fontname" onchange="fontname(this)">
<option value="Arial" selected="selected">Arial</option>
<option value="Courier New">Courier New</option>
<option value="Georgia">Georgia</option>
<option value="Tahoma">Tahoma</option>
<option value="Times New Roman">Times New Roman</option>
<option value="Verdana">Verdana</option>
<option value="otherfont" style="color:#626262;">àçø...</option>
</select>
</span>
תנסה