Tuesday, July 6, 2010
How to change font size using Javascript
var min=11;
var max=16;
function increaseFontSize() {
var p = document.getElementById('storyDiv');
if(p.style.fontSize) {
var s = parseInt(p.style.fontSize.replace("px",""));
} else {
var s = 12;
}
if(s!=max) {
s += 1;
}
p.style.fontSize = s+"px";
}
function decreaseFontSize() {
var p = document.getElementById('storyDiv');
if(p.style.fontSize) {
var s = parseInt(p.style.fontSize.replace("px",""));
} else {
var s = 12;
}
if(s!=min) {
s -= 1;
}
p.style.fontSize = s+"px";
}
April 14, 2011 at 11:09 AM
Hello,
i want to say thank you for a great job you've done on your blog.
I have a software download website and I also write articles for people to help them with their computers and software. Is it possible to place this article on your blog as a guest post?
Regards,
Andy G.
September 7, 2011 at 3:30 AM
Helo,
Thanks for this amazing post this helped me a lot ..
i came to your blog from google and your blog is just like amazing
anewayz thanks for clicking here