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; […]

Share

JavaScript built-in functions Read More »

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>

Share

java script events Read More »

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)) {

Share

Phone and Email Validation – Javascript Read More »

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

Share

AngularJS Read More »

Share
Scroll to Top