Http://www.cnblogs.com/sink_cup/archive/2010/12/16/javascript_screen_width.html
Javascript detects your resolution and the font size is set automatically
Window. onresize
<! -- Pagebeginhtml block begin -->
<SCRIPT type = "text/JavaScript">
Function Changefontsize ()
{
VaR Font_size = screen. width/64 + 'px ';
Document. Body. style. fontsize = font_size;
If (Document. getelementbyid ('font _ size') = Null )
{
VaR Pnode = Document. createelement ("p ");
Pnode. ID = 'font _ size ';
Document. Body. insertbefore (pnode, document. Body. childnodes [0]);
}
Else
{
Pnode = Document. getelementbyid ('font _ size ');
}
Pnode.style.css text = 'margin: 0; Background: # ffffe1; border-bottom: 1px solid #666666 ;';
Pnode. innerhtml = "javascript detects that your resolution is" + screen. Width + 'X' + screen. height + ', and the' + 'font size is automatically set to' + font_size;
}
Changefontsize ();
Window. onresize = Function ()
{
Changefontsize ();
}
</SCRIPT>