Q:

javascript - how to get the inner html width of the webpage

I have a few client sites that have a width of about 900px-1000px centered, using javascript how can I find out what the actual width of the document is? I don't need to know the width of the window, just the width that the actual html document is using.
I also can't use any div id's to find it. I know I can use jquery for this, but I'd like to use plain javascript as jquery isn't running on all the sites. 
In jquery, I can find this out by using:
$('body').outerWidth(true)

Can someone help?

A:

var body = document.getElementsByTag("body")[0];
var width = body.style.width;

another option:
var body = document.getElementsByTag("body")[0];
var width = body.offsetWidth;

