jquery - How to get browser width using JavaScript code? -


I am trying to write the JavaScript function to get the width of the current browser.

I found this one:

  javascript: alert (document.body.offsetWidth);  

But its problem is that if the body's width is 100% then it fails.

Is there any other better work or an alternative solution?

This is one. I advise to leave the nonsense and the experiment, from which you will get to $ (window). Width () .


Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -