Javascript

JavaScript built-in functions

Built-in Functions : JavaScript  Javascript functions (in the place of console.log(), you can use document.write() see output on browser) let num = 1234.5678; console.log(num.toExponential(2)); // Output: 1.23e+3 let num = 123.456; console.log(num.toFixed(2)); // Output: 123.46 let num = 1234567.89; console.log(num.toLocaleString(‘en-US’)); // Output: 1,234,567.89 let num = 123.456; console.log(num.toPrecision(5)); // Output: 123.46 let num = 123; …

JavaScript built-in functions Read More »

Share

conditional formatting using java-script

Conditional formatting using JavaScript with color code. <!DOCTYPE html> <html> <head> <meta charset=”utf-8″> <meta name=”viewport” content=”width=device-width, initial-scale=1″> <title></title> <style> .red { background-color: red; } .green { background-color: green; } .orange { background-color: orange; } .skyblue { background-color: skyblue; } .teal{ background-color: teal; } .darkred{ background-color: darkred; } .head{border-radius: 20px; background-color: teal; color: white; text-align: center}; …

conditional formatting using java-script Read More »

Share

java script events

The document.getElementById() returns an Element object representing the element whose id property matches the specified string. Following are example based on document.getElementById: Checkbox event demo <!DOCTYPE html> <html> <head> <style> body{background-image: linear-gradient(to bottom, green, lightgreen);background-repeat: no-repeat; color:white; border-radius: 20px;”} </style> </head> <body> <h1 style=”background-image: linear-gradient(to right, red, orange); color:white; border-radius: 20px;”> Chose your educational qualification</h1> …

java script events Read More »

Share

Upload Image to server or database using php

Another interesting article on that how to insert or store an image or any file (pdf preferably) into a database or at server location. Let’s begin! First need to create an HTML File uploading image save file as upload.html <hhtml> <head> <title> Upload files to server </title> <style> #tab{background-image: linear-gradient(to right, white, lightgreen); border: solid; …

Upload Image to server or database using php Read More »

Share

Full stack developer

What is a full-stack developer? An Information Technology (IT) expert who can work both on a user interface (UI)or client-side and user experience (UX) or server-side technologies and this person knows the 3-tire model of an application. Presentation tier [UI] Business Logic [programming /UX] Database layer [Database server] Now a day’s full-stack developer is in …

Full stack developer Read More »

Share

Phone and Email Validation – Javascript

Phone and Email Address validation using Javascript The below example with source code explains how to validate phone/mobile number and email address. Source code: [Create the following program in an editor] <html> <head> <script type=”text/javascript”> function Validation() { var a=document.form.phone.value; var b=document.form.email.value; if(a==””) { alert(“please Enter the Contact Number”); document.form.phone.focus(); return false; } if(isNaN(a)) { …

Phone and Email Validation – Javascript Read More »

Share

AngularJS

What is AngularJS? AngularJS is a front-end open source javascript based framework. AngularJS is maintained and developed by Google and its community of developers. Angular JS is written in javascript and its a cross-platform browser supporting tool. Here the more focus is on HTML web apps with best user experience across different screen sizes (Mobile/Desktop/Projector …

AngularJS Read More »

Share

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 loop programs Read More »

Share

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 programs Read More »

Share

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 …

check internet connection status Read More »

Share
Share
Scroll to Top