Change Font Size and Color using Javascript
By Webdevelopmentlogics
We can change the size and font of TEXTAREA or any element using the id of the element
Ex:
textarea cols="20" rows="10" id="txtarea"
input name="button" value="ChangeFont" onclick="changeFont()" type="button"
function changeFont() {
document.getElementById('txtarea').style.fontWeight = 'bold';
document.getElementById('txtarea').style.fontFamily = 'arial';
document.getElementById('txtarea').style.fontStyle = 'italic';
document.getElementById('txtarea').style.fontSize = '14px';
document.getElementById('txtarea').style.color = 'red';
}
0 Responses to Change Font Size and Color using Javascript
Something to say?