29 lines
459 B
JavaScript
29 lines
459 B
JavaScript
var fontSize = 11;
|
|
var lineHeight = 16;
|
|
|
|
function setFaceSize()
|
|
{
|
|
lineHeight = fontSize+Math.round(.3*fontSize);
|
|
|
|
obj = document.getElementById("article");
|
|
obj.style.fontSize = fontSize+"px";
|
|
obj.style.lineHeight = lineHeight+"px"
|
|
}
|
|
|
|
function FontLarger()
|
|
{
|
|
if (fontSize < 26) {
|
|
fontSize = fontSize+2;
|
|
setFaceSize();
|
|
}
|
|
}
|
|
|
|
function FontSmaler()
|
|
{
|
|
if (fontSize > 11) {
|
|
fontSize = fontSize-2
|
|
setFaceSize();
|
|
}
|
|
}
|
|
|