Javascript

Javascript loop programs

1. Print 1-10 numbers using FOR loop program <html> <head> <title> Javascript looping program </title> </head> <body> <script language=”javascript”> var i document.write(“<h1>”+”FOR Looping program” +”</h1>”) for(i=1; i<=10; i++) { document.write(i+”<br>”) } </script> </body> </html> 2. WHILE Loop using Javascript <html> <head> <title> Javascript while loop program </title> </head> <body> <script language=”javascript”> var i=1 document.write(“<h1>”+”WHILE Loop […]






Javascript

Javascript programs

Java Script is an interpreted, object-based scripting language, developed by Sun Micro systems and Netscape.  JavaScript makes it easier to create interactive Web Pages.  Common Gateway Interface was considered as the standard for processing the forms. It was time consuming process because form validation used to take place on the server side.  JavaScript made the entire work easier by […]






Javascript

check internet connection status

This java script example demonstrates that,  whether your browser is online or offline. <html> <head> </head> <body> <h1> Check internet connection status </h1> <script> function status() { if(navigator.onLine) { alert(“You are Online!”) } else { alert(“You are Offline!”) } } </script> <button onclick=”status();”>check internect connection status </button> <br> <h1> This is refresh code </h1> <a […]