I have a function which wanders through the elements in a page and adjusts the font size
function changebuttonsize (sz)
{
var z = document.body.getElementsByTagName("*");
for (var i=0; i<z.length; i++)
{
if (z[i].id=="BTSz")
{
z[i].style.fontSize = sz;
}
}
}
I use it to change the size of the following buttons
<input id="BTSz" type="button" style="font-size:16px;" value="Back" onclick="history.go(-1);"/>
<input id="BTSz" type="button" style="font-size:16px;" value="Index" onclick="location.href='Index.html';"/>
<input id="BTSz" type="button" style="font-size:16px;" value="Home" onclick="location.href='Introduction.html';"/>
The problem is that I had to include a style clause in the button definition or the change did not take effect. Is there some way to correct this? Do I somehow have to create a style area for the element?