This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- States of Pakistan --> | |
<select> | |
<option value="1">FATA</option> | |
<option value="2">Balochistan</option> | |
<option value="3">Khyber Pakhtunkhwa</option> | |
<option value="4">Punjab</option> | |
<option value="5">Sindh</option> | |
<option value="6">Azad Kashmir</option> | |
<option value="7">Gilgit-Baltistan</option> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<input placeholder="Date" class="dateDO" type="text" onfocus="(this.type='date')" id="date"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Date onfocus in java script --> | |
<input placeholder="Date" class="dateDO" type="text" onfocus="(this.type='date')" id="date"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- States of India --> | |
<select> | |
<option value="AP">Andhra Pradesh</option> | |
<option value="AR">Arunachal Pradesh</option> | |
<option value="AS">Assam</option> | |
<option value="BR">Bihar</option> | |
<option value="CT">Chhattisgarh</option> | |
<option value="GA">Gujarat</option> | |
<option value="HR">Haryana</option> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
new Date(new Date(myStringDate).getTime() + 60 * 60 * 24 * 1000); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In this article, we will discuss the lifecycle of components. Since, in Angular, a component is the main building block the application, it is very important for us to understand the lifecycle processing steps of the components so that we can implement that in our applications. | |
Lifecycle Method | |
In Angular, every component has a life-cycle, a number of different stages it goes through. There are 8 different stages in the component lifecycle. Every stage is called as lifecycle hook event. So, we can use these hook events in different phases of our application to obtain control of the components. Since a component is a TypeScript class, every component must have a constructor method. The constructor of the component class executes, first, before the execution of any other lifecycle hook events. If we need to inject any dependencies into the component, then the constructor is the best place to inject those dependencies. After executing the constructor, Angular executes its lifecycle hook methods in a specific or |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<body> | |
<div id="demo"> | |
<h2>The XMLHttpRequest Object</h2> | |
<button type="button" onclick="loadDoc()">Change Content</button> | |
</div> | |
<script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title></title> | |
<link href="http://code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css" rel="Stylesheet" | |
type="text/css" /> | |
<script type="text/javascript" src="http://code.jquery.com/jquery-1.7.2.min.js"></script> | |
<script type="text/javascript" src="http://code.jquery.com/ui/1.10.4/jquery-ui.js"></script> | |
<script language="javascript"> | |
$(document).ready(function () { | |
$("#txtdate").datepicker({ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// set data on localstorage | |
localStorage.setItem("username", "admin"); | |
// get data from localstorage | |
localStorage.getItem("username"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const array1 = ['a', 'b', 'c']; | |
array1.forEach(element => console.log(element)); | |
// expected output: "a" | |
// expected output: "b" | |
// expected output: "c" |
OlderNewer