<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>javascript Archives -</title>
	<atom:link href="https://mitindia.in/tag/javascript/feed/" rel="self" type="application/rss+xml" />
	<link>https://mitindia.in/tag/javascript/</link>
	<description></description>
	<lastBuildDate>Fri, 31 Mar 2023 05:21:48 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://mitindia.in/wp-content/uploads/2023/03/cropped-android-chrome-512x512-1-32x32.png</url>
	<title>javascript Archives -</title>
	<link>https://mitindia.in/tag/javascript/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>JavaScript built-in functions</title>
		<link>https://mitindia.in/built-in-javascript-functions/</link>
		
		<dc:creator><![CDATA[SKB]]></dc:creator>
		<pubDate>Fri, 31 Mar 2023 05:21:48 +0000</pubDate>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[math functions]]></category>
		<guid isPermaLink="false">https://www.mitindia.in/?p=1784</guid>

					<description><![CDATA[<p>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(&#8216;en-US&#8217;)); // Output: 1,234,567.89 let num = 123.456; console.log(num.toPrecision(5)); // Output: 123.46 let num = 123; [&#8230;]</p>
<p>The post <a href="https://mitindia.in/built-in-javascript-functions/">JavaScript built-in functions</a> appeared first on <a href="https://mitindia.in"></a>.</p>
]]></description>
										<content:encoded><![CDATA[<h1><span style="color: #333300;">Built-in Functions : JavaScript </span></h1>
<p><span style="color: #666699;">Javascript functions (in the place of console.log(), you can use </span><br />
<span style="color: #666699;">document.write() see output on browser)</span></p>
<hr />
<p>let num = 1234.5678;<br />
<strong>console.log(num.toExponential(2)); // Output: 1.23e+3</strong></p>
<p>let num = 123.456;<br />
<strong>console.log(num.toFixed(2)); // Output: 123.46</strong></p>
<p>let num = 1234567.89;<br />
<strong>console.log(num.toLocaleString(&#8216;en-US&#8217;)); // Output: 1,234,567.89</strong></p>
<p>let num = 123.456;<br />
<strong>console.log(num.toPrecision(5)); // Output: 123.46</strong></p>
<p>let num = 123;<br />
<strong>console.log(num.toString()); // Output: &#8220;123&#8221;</strong></p>
<p>let num = 123;<br />
<strong>console.log(num.valueOf()); // Output: 123</strong></p>
<p>let str = &#8220;Hello World&#8221;;<br />
<strong>console.log(str.charAt(0)); // Output: &#8220;H&#8221;</strong></p>
<p>let str = &#8220;Hello World&#8221;;<br />
<strong>console.log(str.charCodeAt(0)); // Output: 72</strong></p>
<p>let str1 = &#8220;Hello&#8221;;<br />
let str2 = &#8220;World&#8221;;<br />
<strong>console.log(str1.concat(&#8221; &#8220;, str2)); // Output: &#8220;Hello World&#8221;</strong></p>
<p>let str = &#8220;Hello World&#8221;;<br />
<strong>console.log(str.indexOf(&#8220;World&#8221;)); // Output: 6</strong></p>
<p>let str = &#8220;Hello World&#8221;;<br />
<strong>console.log(str.lastIndexOf(&#8220;l&#8221;)); // Output: 9</strong></p>
<p>let str1 = &#8220;Hello&#8221;;<br />
let str2 = &#8220;hello&#8221;;<br />
<strong>console.log(str1.localeCompare(str2)); // Output: -1</strong></p>
<p>let str = &#8220;Hello World&#8221;;<br />
<strong>console.log(str.length); // Output: 11</strong></p>
<p>let str = &#8220;The quick brown fox jumps over the lazy dog&#8221;;<br />
<strong>console.log(str.match(/the/gi)); // Output: [&#8220;the&#8221;, &#8220;the&#8221;]</strong></p>
<p>let str = &#8220;Hello World&#8221;;<br />
<strong>console.log(str.replace(&#8220;World&#8221;, &#8220;Universe&#8221;)); // Output: &#8220;Hello </strong><br />
<strong>Universe&#8221;</strong></p>
<p>let str = &#8220;The quick brown fox jumps over the lazy dog&#8221;;<br />
<strong>console.log(str.search(&#8220;fox&#8221;)); // Output: 16</strong></p>
<p>let str = &#8220;Hello World&#8221;;<br />
<strong>console.log(str.slice(0, 5)); // Output: &#8220;Hello&#8221;</strong></p>
<p>let str = &#8220;Hello World&#8221;;<br />
<strong>console.log(str.split(&#8221; &#8220;)); // Output: [&#8220;Hello&#8221;, &#8220;World&#8221;]</strong></p>
<p>let str = &#8220;Hello World&#8221;;<br />
<strong>console.log(str.substr(6, 5)); // Output: &#8220;World&#8221;</strong></p>
<p>let str = &#8220;Hello World&#8221;;<br />
<strong>console.log(str.substring(6, 11)); // Output: &#8220;World&#8221;</strong></p>
<p>let str = &#8220;Hello WORLD&#8221;;<br />
<strong>console.log(str.toLocaleLowerCase()); // Output: &#8220;hello world&#8221;</strong></p>
<p>let str = &#8220;Hello World&#8221;;<br />
<strong>console.log(str.toLocaleUpperCase()); // Output: &#8220;HELLO WORLD&#8221;</strong></p>
<p>let str = &#8220;Hello WORLD&#8221;;<br />
<strong>console.log(str.toLowerCase()); // Output: &#8220;hello world&#8221;</strong></p>
<p>let str = &#8220;Hello World&#8221;;<br />
<strong>console.log(str.toUpperCase()); // Output: &#8220;HELLO WORLD&#8221;</strong></p>
<p>let date = new Date();<br />
<strong>console.log(date); // Output: current date and time</strong></p>
<p>let date = new Date();<br />
<strong>console.log(date.getDate()); // Output: current day of the month</strong></p>
<p>let date = new Date();<br />
<strong>console.log(date.getDay()); // Output: current day of the week (0-6)</strong></p>
<p>let date = new Date();<br />
<strong>console.log(date.getFullYear()); // Output: current year (e.g. 2021)</strong></p>
<p>let date = new Date();<br />
<strong>console.log(date.getHours()); // Output: current hour (0-23)</strong></p>
<p>let date = new Date();<br />
<strong>console.log(date.getMilliseconds()); // Output: current millisecond (0- </strong><br />
<strong>999)</strong></p>
<p>let date = new Date();<br />
<strong>console.log(date.getMinutes()); // Output: current minute (0-59)</strong></p>
<p>let date = new Date();<br />
<strong>console.log(date.getMonth()); // Output: current month (0-11)</strong></p>
<p>let date = new Date();<br />
<strong>console.log(date.getSeconds()); // Output: current second (0-59)</strong></p>
<p>let x = 10;<br />
let y = 20;<br />
let result = eval(&#8216;x + y&#8217;);<br />
<strong>console.log(result); // Output: 30</strong></p>
<p>let angle = Math.PI / 4;<br />
<strong>console.log(Math.sin(angle)); // Output: 0.7071067811865476</strong><br />
<strong>console.log(Math.cos(angle)); // Output: 0.7071067811865475</strong><br />
<strong>console.log(Math.tan(angle)); // Output: 0.9999999999999999</strong></p>
<p><strong>console.log(Math.abs(-10)); // Output: 10</strong><br />
<strong>console.log(Math.ceil(1.5)); // Output: 2</strong><br />
<strong>console.log(Math.floor(1.5)); // Output: 1</strong><br />
<strong>console.log(Math.log(10)); // Output: 2.302585092994046</strong><br />
<strong>console.log(Math.max(1, 2, 3)); // Output: 3</strong><br />
<strong>console.log(Math.min(1, 2, 3)); // Output: 1</strong><br />
<strong>console.log(Math.pow(2, 3)); // Output: 8</strong><br />
<strong>console.log(Math.random()); // Output: a random number between 0 </strong><br />
<strong>and 1</strong><br />
<strong>console.log(Math.round(1.5)); // Output: 2</strong><br />
<strong>console.log(Math.sin(Math.PI / 2)); // Output: 1</strong><br />
<strong>console.log(Math.sqrt(25)); // Output: 5</strong></p>
<p><a class="a2a_button_whatsapp" href="https://www.addtoany.com/add_to/whatsapp?linkurl=https%3A%2F%2Fmitindia.in%2Fbuilt-in-javascript-functions%2F&amp;linkname=JavaScript%20built-in%20functions" title="WhatsApp" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fmitindia.in%2Fbuilt-in-javascript-functions%2F&amp;linkname=JavaScript%20built-in%20functions" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fmitindia.in%2Fbuilt-in-javascript-functions%2F&#038;title=JavaScript%20built-in%20functions" data-a2a-url="https://mitindia.in/built-in-javascript-functions/" data-a2a-title="JavaScript built-in functions"><img src="https://static.addtoany.com/buttons/favicon.png" alt="Share"></a></p><p>The post <a href="https://mitindia.in/built-in-javascript-functions/">JavaScript built-in functions</a> appeared first on <a href="https://mitindia.in"></a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>java script events</title>
		<link>https://mitindia.in/java-script-events/</link>
		
		<dc:creator><![CDATA[SKB]]></dc:creator>
		<pubDate>Sat, 07 Jan 2023 07:48:30 +0000</pubDate>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[getelementbyid]]></category>
		<category><![CDATA[javascript]]></category>
		<guid isPermaLink="false">https://www.mitindia.in/?p=1299</guid>

					<description><![CDATA[<p>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 &#60;!DOCTYPE html&#62; &#60;html&#62; &#60;head&#62; &#60;style&#62; body{background-image: linear-gradient(to bottom, green, lightgreen);background-repeat: no-repeat; color:white; border-radius: 20px;"} &#60;/style&#62; &#60;/head&#62; &#60;body&#62; &#60;h1 style="background-image: linear-gradient(to right, red, orange); color:white; border-radius: 20px;"&#62; Chose your educational qualification&#60;/h1&#62; [&#8230;]</p>
<p>The post <a href="https://mitindia.in/java-script-events/">java script events</a> appeared first on <a href="https://mitindia.in"></a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>The document.getElementById() returns an Element object representing the element whose id property matches the specified string.</p>
<p>Following are example based on document.getElementById:</p>
<ol>
<li>Checkbox event demo</li>
</ol>
<pre class="EnlighterJSRAW" data-enlighter-language="generic">&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;
&lt;style&gt;
    body{background-image: linear-gradient(to bottom, green, lightgreen);background-repeat: no-repeat; color:white; border-radius: 20px;"}
&lt;/style&gt;
&lt;/head&gt;

&lt;body&gt;

&lt;h1 style="background-image: linear-gradient(to right, red, orange); color:white; border-radius: 20px;"&gt; Chose your educational qualification&lt;/h1&gt;


&lt;form&gt;
&lt;input type="checkbox" name="edu" value="Degree"&gt;Under Graduate&lt;br&gt;
&lt;input type="checkbox" name="edu" value="PostGraduate"&gt;Post Graduate &lt;br&gt;
&lt;input type="checkbox" name="edu" value="Diploma"&gt;Diploma &lt;br&gt;
&lt;br&gt;
&lt;input type="button" onclick="fun()" value="Show"&gt;

&lt;input type="text" id="print" size="50"&gt;
&lt;/form&gt;

&lt;script&gt;
function fun() {
  var e = document.forms[0];
  var txt = "";
  var i;
  for (i = 0; i &lt; e.length; i++) {
    if (e[i].checked) {
      txt = txt + e[i].value + " ";
    }
  }
  document.getElementById("print").value = "Your qualification: " + txt;
}
&lt;/script&gt;


&lt;p style="background-image: linear-gradient(to right, teal, white); color:black; text-align: justify;"&gt;
&lt;b&gt;Note: &lt;/b&gt;The Document method getElementById() returns an Element object representing the element whose id property matches the specified string. Since element IDs are required to be unique if specified, they're a useful way to get access to a specific element quickly. &lt;/p&gt; 
&lt;/body&gt;
&lt;/html&gt;
</pre>
<p>Output of above code is:</p>
<p><img decoding="async" class="alignnone size-medium wp-image-1300" src="http://www.mitindia.in/wp-content/uploads/2023/01/checkdemo-300x83.png" alt="" width="300" height="83" srcset="https://mitindia.in/wp-content/uploads/2023/01/checkdemo-300x83.png 300w, https://mitindia.in/wp-content/uploads/2023/01/checkdemo-1024x283.png 1024w, https://mitindia.in/wp-content/uploads/2023/01/checkdemo-768x212.png 768w, https://mitindia.in/wp-content/uploads/2023/01/checkdemo.png 1346w" sizes="(max-width: 300px) 100vw, 300px" /></p>
<p>2. Radio button event demo</p>
<pre class="EnlighterJSRAW" data-enlighter-language="generic">&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;
    &lt;meta charset="utf-8"&gt;
    &lt;meta name="viewport" content="width=device-width, initial-scale=1"&gt;
    &lt;title&gt;&lt;/title&gt;

&lt;style&gt;
    body{background-image: linear-gradient(to bottom, green, lightgreen);background-repeat: no-repeat; color:white; border-radius: 20px;"}
&lt;/style&gt;

&lt;script type="text/javascript"&gt;
    function r1() {
  var x = document.getElementById("cash").checked;
  document.getElementById("disp").innerHTML = "You selected :&lt;b&gt; Cash";
}

function r2() {
  var y = document.getElementById("upi").checked;
  document.getElementById("disp").innerHTML = "You selected : &lt;b&gt; UPI";
}

function r3() {
  var y = document.getElementById("net").checked;
  document.getElementById("disp").innerHTML = "You selected : &lt;b&gt; Net Banking";
}

&lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
    &lt;center&gt;
&lt;h1 style="background-image: linear-gradient(to right, red, orange); color:white; border-radius: 20px;"&gt; Radio button with event &lt;/h1&gt;
Mode of Payment: 
&lt;input type="radio" name="mop" id="cash" value="Cash" onclick="r1()"&gt;Cash
&lt;input type="radio" name="mop" id="upi" value="UPI" onclick="r2()"&gt;UPI
&lt;input type="radio" name="mop" id="net" value="Net Banking" onclick="r3()"&gt;Net Banking

&lt;p id='disp'&gt; &lt;/p&gt;
&lt;br&gt;&lt;br&gt;
&lt;p style="background-image: linear-gradient(to right, green, lightgreen); color:white; border-radius: 20px;"&gt;MIT India &lt;/p&gt;


&lt;p style="background-image: linear-gradient(to right, gray, white); color:black; text-align: justify;"&gt;
&lt;b&gt;Note: &lt;/b&gt;The Document method getElementById() returns an Element object representing the element whose id property matches the specified string. Since element IDs are required to be unique if specified, they're a useful way to get access to a specific element quickly. &lt;/p&gt;


&lt;/body&gt;
&lt;/html&gt;</pre>
<p>output of above code is:</p>
<p><img decoding="async" class="alignnone size-medium wp-image-1301" src="http://www.mitindia.in/wp-content/uploads/2023/01/radioevent-300x89.png" alt="" width="300" height="89" srcset="https://mitindia.in/wp-content/uploads/2023/01/radioevent-300x89.png 300w, https://mitindia.in/wp-content/uploads/2023/01/radioevent-1024x304.png 1024w, https://mitindia.in/wp-content/uploads/2023/01/radioevent-768x228.png 768w, https://mitindia.in/wp-content/uploads/2023/01/radioevent.png 1334w" sizes="(max-width: 300px) 100vw, 300px" /></p>
<p>3. Combo box event demo:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="generic">&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;
    &lt;meta charset="utf-8"&gt;
    &lt;meta name="viewport" content="width=device-width, initial-scale=1"&gt;
    &lt;title&gt;&lt;/title&gt;

&lt;style&gt;
    body{background-image: linear-gradient(to right, green, lightgreen);border-radius: 20px;"}
&lt;/style&gt;
&lt;script type="text/javascript"&gt;
   function fun() {
  var x = document.getElementById("mop").value;
  document.getElementById("disp").innerHTML ="Your mode of payment is &lt;b&gt;&lt;u&gt;"+ x;
}
 &lt;/script&gt;
&lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
    &lt;center&gt;
&lt;h1 style="background-image: linear-gradient(to right, red, orange); color:white; border-radius: 20px;"&gt; Combo with event &lt;/h1&gt;
Mode of Payment: 
&lt;select id="mop"&gt;
&lt;option value="Cash"&gt; Cash &lt;/option&gt;
&lt;option value="UPI"&gt; UPI &lt;/option&gt;
&lt;option value="Net Banking"&gt; Net Banking &lt;/option&gt;
&lt;/select&gt;
&lt;input type="button" name="b1" value="Check" onclick="fun()"&gt;
&lt;p id='disp'&gt; &lt;/p&gt;
&lt;br&gt;&lt;br&gt;
&lt;p style="background-image: linear-gradient(to right, teal, lightgreen); color:white; border-radius: 20px;"&gt;MIT India &lt;/p&gt;

&lt;p style="background-image: linear-gradient(to right, white, green, white); color:black; text-align: justify;"&gt;
&lt;b&gt;Note: &lt;/b&gt;The Document method getElementById() returns an Element object representing the element whose id property matches the specified string. Since element IDs are required to be unique if specified, they're a useful way to get access to a specific element quickly. &lt;/p&gt;

&lt;/body&gt;
&lt;/html&gt;</pre>
<p>output of above code is:</p>
<p><img decoding="async" class="alignnone size-medium wp-image-1302" src="http://www.mitindia.in/wp-content/uploads/2023/01/comboevent-300x76.png" alt="" width="300" height="76" srcset="https://mitindia.in/wp-content/uploads/2023/01/comboevent-300x76.png 300w, https://mitindia.in/wp-content/uploads/2023/01/comboevent-1024x259.png 1024w, https://mitindia.in/wp-content/uploads/2023/01/comboevent-768x194.png 768w, https://mitindia.in/wp-content/uploads/2023/01/comboevent.png 1325w" sizes="(max-width: 300px) 100vw, 300px" /></p>
<p><a class="a2a_button_whatsapp" href="https://www.addtoany.com/add_to/whatsapp?linkurl=https%3A%2F%2Fmitindia.in%2Fjava-script-events%2F&amp;linkname=java%20script%20events" title="WhatsApp" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fmitindia.in%2Fjava-script-events%2F&amp;linkname=java%20script%20events" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fmitindia.in%2Fjava-script-events%2F&#038;title=java%20script%20events" data-a2a-url="https://mitindia.in/java-script-events/" data-a2a-title="java script events"><img src="https://static.addtoany.com/buttons/favicon.png" alt="Share"></a></p><p>The post <a href="https://mitindia.in/java-script-events/">java script events</a> appeared first on <a href="https://mitindia.in"></a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Phone and Email Validation &#8211; Javascript</title>
		<link>https://mitindia.in/phone-and-email-validation-javascript/</link>
		
		<dc:creator><![CDATA[SKB]]></dc:creator>
		<pubDate>Wed, 15 May 2019 05:28:21 +0000</pubDate>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[email id validation]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[phone number validation]]></category>
		<guid isPermaLink="false">http://www.mitindia.in/?p=956</guid>

					<description><![CDATA[<p>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] &#60;html&#62; &#60;head&#62; &#60;script type=&#8221;text/javascript&#8221;&#62; function Validation() { var a=document.form.phone.value; var b=document.form.email.value; if(a==&#8221;&#8221;) { alert(&#8220;please Enter the Contact Number&#8221;); document.form.phone.focus(); return false; } if(isNaN(a)) { [&#8230;]</p>
<p>The post <a href="https://mitindia.in/phone-and-email-validation-javascript/">Phone and Email Validation &#8211; Javascript</a> appeared first on <a href="https://mitindia.in"></a>.</p>
]]></description>
										<content:encoded><![CDATA[<h1><span style="color: #993300;">Phone and Email Address validation using Javascript</span></h1>
<p>The below example with source code explains how to validate phone/mobile number and email address.</p>
<p>Source code: [Create the following program in an editor]</p>
<blockquote><p>&lt;html&gt;<br />
&lt;head&gt;<br />
&lt;script type=&#8221;text/javascript&#8221;&gt;<br />
function Validation()<br />
{<br />
var a=document.form.phone.value;<br />
var b=document.form.email.value;<br />
if(a==&#8221;&#8221;)<br />
{<br />
alert(&#8220;please Enter the Contact Number&#8221;);<br />
document.form.phone.focus();<br />
return false;<br />
}<br />
if(isNaN(a))<br />
{<br />
alert(&#8220;Enter the valid Mobile Number(Like : 9876543210)&#8221;);<br />
document.form.phone.focus();<br />
return false;<br />
}<br />
if(a.length!=10)<br />
{<br />
alert(&#8221; Your Mobile Number must be 10 Integers&#8221;);<br />
document.form.phone.select();<br />
return false;<br />
}</p>
<p>len=b.length<br />
for(i=2; i&lt;len; i++)<br />
{<br />
if(b.charAt(i)==&#8217;@&#8217;)<br />
{ return true}<br />
}<br />
alert(&#8220;Invalid EmailId&#8221;)<br />
return false</p>
<p>}<br />
&lt;/script&gt;<br />
&lt;/head&gt;<br />
&lt;body&gt;<br />
&lt;form name=&#8221;form&#8221; method=&#8221;post&#8221; onsubmit=&#8221;return<br />
Validation()&#8221;&gt;<br />
&lt;table border=1 style=&#8221;background-color:khaki; border-radius:5px<br />
5px 5px 5px &#8221; align=&#8221;center&#8221;&gt;<br />
&lt;tr&gt;<br />
&lt;td style=&#8221;background-color:cyan&#8221;&gt; Mobile No:&lt;/td&gt;<br />
&lt;td&gt;&lt;input type=&#8221;text&#8221; name=&#8221;phone&#8221;<br />
style=&#8221;background-color:yellow; border-radius:5px 5px 5px 5px&#8221;&gt;<br />
&lt;/td&gt;<br />
&lt;/tr&gt;</p>
<p>&lt;tr&gt;<br />
&lt;td style=&#8221;background-color:cyan&#8221;&gt; Email ID:&lt;/td&gt;<br />
&lt;td&gt;&lt;input type=&#8221;text&#8221; name=&#8221;email&#8221;<br />
style=&#8221;background-color:yellow; border-radius:5px 5px 5px<br />
5px&#8221;&gt;&lt;/td&gt;<br />
&lt;/tr&gt;</p>
<p>&lt;tr&gt;<br />
&lt;td&gt;&lt;/td&gt;<br />
&lt;td&gt;&lt;input type=&#8221;submit&#8221; name=&#8221;sub&#8221; value=&#8221;Submit&#8221;<br />
style=&#8221;background-color:green; color:white; border-radius:15px<br />
15px 15px 15px&#8221;&gt;&lt;/td&gt;<br />
&lt;/tr&gt;<br />
&lt;/form&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;</p></blockquote>
<p>&nbsp;</p>
<p>And to see an output as following in a browser.</p>
<p><img loading="lazy" decoding="async" class="alignnone size-medium wp-image-957" src="http://www.mitindia.in/wp-content/uploads/2019/05/phone-email-300x118.jpg" alt="Phone and Email validation" width="300" height="118" srcset="https://mitindia.in/wp-content/uploads/2019/05/phone-email-300x118.jpg 300w, https://mitindia.in/wp-content/uploads/2019/05/phone-email-768x302.jpg 768w, https://mitindia.in/wp-content/uploads/2019/05/phone-email.jpg 772w" sizes="(max-width: 300px) 100vw, 300px" /></p>
<p><a href="http://www.mitindia.in/internet-of-things-io/" target="_blank" rel="noopener">also, read on Internet of Things [IoT] Here</a></p>
<p><a class="a2a_button_whatsapp" href="https://www.addtoany.com/add_to/whatsapp?linkurl=https%3A%2F%2Fmitindia.in%2Fphone-and-email-validation-javascript%2F&amp;linkname=Phone%20and%20Email%20Validation%20%E2%80%93%20Javascript" title="WhatsApp" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fmitindia.in%2Fphone-and-email-validation-javascript%2F&amp;linkname=Phone%20and%20Email%20Validation%20%E2%80%93%20Javascript" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fmitindia.in%2Fphone-and-email-validation-javascript%2F&#038;title=Phone%20and%20Email%20Validation%20%E2%80%93%20Javascript" data-a2a-url="https://mitindia.in/phone-and-email-validation-javascript/" data-a2a-title="Phone and Email Validation – Javascript"><img src="https://static.addtoany.com/buttons/favicon.png" alt="Share"></a></p><p>The post <a href="https://mitindia.in/phone-and-email-validation-javascript/">Phone and Email Validation &#8211; Javascript</a> appeared first on <a href="https://mitindia.in"></a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>AngularJS</title>
		<link>https://mitindia.in/angularjs/</link>
		
		<dc:creator><![CDATA[SKB]]></dc:creator>
		<pubDate>Tue, 27 Mar 2018 06:03:28 +0000</pubDate>
				<category><![CDATA[AngularJS]]></category>
		<category><![CDATA[Bootstrap]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[angularjs]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[javascript]]></category>
		<guid isPermaLink="false">http://www.mitindia.in/?p=865</guid>

					<description><![CDATA[<p>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 [&#8230;]</p>
<p>The post <a href="https://mitindia.in/angularjs/">AngularJS</a> appeared first on <a href="https://mitindia.in"></a>.</p>
]]></description>
										<content:encoded><![CDATA[<h3><span style="color: #008080;">What is AngularJS?<img loading="lazy" decoding="async" class=" wp-image-866 alignright" src="http://www.mitindia.in/wp-content/uploads/2018/03/pic_angular.jpg" alt="AngularJS" width="181" height="181" srcset="https://mitindia.in/wp-content/uploads/2018/03/pic_angular.jpg 225w, https://mitindia.in/wp-content/uploads/2018/03/pic_angular-150x150.jpg 150w" sizes="(max-width: 181px) 100vw, 181px" /></span></h3>
<p>AngularJS is a front-end open source javascript based framework.</p>
<p>AngularJS is maintained and developed by Google and its community of developers.</p>
<p>Angular JS is written in javascript and its a cross-platform browser supporting tool.</p>
<p>Here the more focus is on HTML web apps with best user experience across different screen sizes (Mobile/Desktop/Projector screens etc).</p>
<h4><span style="color: #ff0000;"><strong>Why ANGULARJS?</strong></span></h4>
<ul>
<li>Defines a number of ways to organize web application at the client side.</li>
<li>It enhances HTML by including directives, custom tags, attributes, expressions, templates within HTML.</li>
<li>It also encourages MVC design pattern</li>
<li>The code can be reused.</li>
<li>and its best for Single Page Apps (SPA)</li>
</ul>
<h4><span style="color: #ff0000;">Features of ANGULARJS</span></h4>
<ul>
<li>Declarative HTML approach</li>
<li>Easy Data Binding</li>
<li>Components can be reused</li>
<li>MVC Design Pattern</li>
<li>Dependency Injection</li>
<li>End to end Integration Testing</li>
<li>Routing</li>
<li>Templating</li>
<li>Modules</li>
<li>Services</li>
<li>Expressions</li>
<li>Filters</li>
<li>Directives</li>
<li>Form Validation</li>
<li>$scope, $http, $routeProvider</li>
</ul>
<h4><span style="color: #ff0000;"><strong>Directive</strong></span></h4>
<ul>
<li>The directives can be placed in element names, attributes, class names, as well as comments.<br />
Directives are a way to teach HTML new tricks.<br />
A directive is just a function which executes when the compiler encounters it in the DOM.<br />
&lt;input ng-model=&#8217;name&#8217;&gt;<br />
Custom Defined Directives<br />
&lt;span draggable&gt;Drag ME&lt;/span&gt;</li>
</ul>
<p><span style="color: #0000ff;"><strong>ng-app</strong></span><br />
Use this directive to auto-bootstrap an application.<br />
Only one ng-app directive can be used per HTML document<br />
&lt;html ng-app&gt;</p>
<p>&nbsp;</p>
<h4><span style="color: #0000ff;">Expressions</span></h4>
<p>Expressions are JavaScript-like code snippets that are usually placed in bindings such as {{<br />
expression }}<br />
&lt;body&gt;<br />
1+2={{1+2}}<br />
&lt;/body&gt;</p>
<p><strong>Example:</strong></p>
<blockquote><p>&lt;!DOCTYPE html&gt;<br />
&lt;html&gt;<br />
&lt;script src=&#8221;https://ajax.googleapis.com/ajax/libs/angularjs/1.6.4/angular.min.js&#8221;&gt;&lt;/script&gt;<br />
&lt;body&gt;<br />
&lt;h1&gt; AngularJS Text Entry change event &lt;/h1&gt;&lt;hr&gt;<br />
&lt;div ng-app=&#8221;&#8221;&gt;<br />
&lt;p&gt;Name: &lt;input type=&#8221;text&#8221; ng-model=&#8221;name&#8221;&gt;&lt;/p&gt;<br />
&lt;p ng-bind=&#8221;name&#8221;&gt;&lt;/p&gt;<br />
&lt;p&gt;SUM of two numbers: {{ 4 + 5 }}&lt;/p&gt;<br />
&lt;form name=&#8221;myForm&#8221;&gt;<br />
Email:<br />
&lt;input type=&#8221;email&#8221; name=&#8221;myAddress&#8221; ng-model=&#8221;text&#8221;&gt;<br />
&lt;span ng-show=&#8221;myForm.myAddress.$error.email&#8221;&gt;Not a valid e-mail address&lt;/span&gt;<br />
&lt;/form&gt;<br />
&lt;/div&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;</p></blockquote>
<p><a href="http://www.mitindia.in/artificial-intelligence/" target="_blank" rel="noopener">You can also read on AI here</a></p>
<p><a class="a2a_button_whatsapp" href="https://www.addtoany.com/add_to/whatsapp?linkurl=https%3A%2F%2Fmitindia.in%2Fangularjs%2F&amp;linkname=AngularJS" title="WhatsApp" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fmitindia.in%2Fangularjs%2F&amp;linkname=AngularJS" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fmitindia.in%2Fangularjs%2F&#038;title=AngularJS" data-a2a-url="https://mitindia.in/angularjs/" data-a2a-title="AngularJS"><img src="https://static.addtoany.com/buttons/favicon.png" alt="Share"></a></p><p>The post <a href="https://mitindia.in/angularjs/">AngularJS</a> appeared first on <a href="https://mitindia.in"></a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
