Category Archives: Java Script

How to get the size of screen window using jQuery?

you can get the size of the window or document using jQuery methods: $(window).height(); // returns height of browser viewport $(document).height(); // returns height of HTML document (same as pageHeight in screenshot) $(window).width(); // returns width of browser viewport $(document).width(); // returns width of HTML document (same as pageWidth in screenshot) A non-jQuery way to… Read More »

How to Auto Refresh Page Every 10 Seconds

There are multiple solutions for this. If you want the page to be refreshed you actually don’t need JavaScript, Just a simple line of code in the head section can refresh the page <meta http-equiv=”refresh” content=”30″/> The browser will then refresh the page every 30 seconds. If you want refresh the page with javascript code… Read More »

How to disable the Enter key

In this tutorial, Show you how to disable the “Enter” Key. If you have an HTML form on your web page, many times your visitors may hit the ‘Enter’ key on their keyboard. Disabled Enter Key Example : <script type=”text/javascript”> function stopenterKey(evt) { var evt = (evt) ? evt : ((event) ? event : null);… Read More »