I think this is what you're looking for:
function getDefaultFontSize () {
// this will return the default* value assigned to the style: fontSize
defsize=(document.body.style.fontSize)
alert('The default font size of your browser is: "' + defsize + '"');
}
*If body has a different fontSize decleration anywhere else in the code (perhaps in some css) the function will return that value. For example:
<style>body{font-size:20px;}</style>
<script>function getDefaultFontSize () {
defsize=(document.body.style.fontSize)
} </script>
The above will return a fontSize value of 20px.
Fully tested and works for me (chrome 22.0.1229.94 m and firefox 13.01).