<?xml version='1.0' encoding='UTF-8'?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/" xmlns:blogger="http://schemas.google.com/blogger/2008" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-3309874475194892630</atom:id><lastBuildDate>Sat, 05 Oct 2024 03:18:08 +0000</lastBuildDate><category>JavaScript</category><category>JavaScript Calculator</category><category>JavaScript examples</category><category>assignment operator</category><category>comments</category><category>variables</category><title>JavaScript</title><description></description><link>http://javascriptelcric.blogspot.com/</link><managingEditor>noreply@blogger.com (Ron Tinnel)</managingEditor><generator>Blogger</generator><openSearch:totalResults>2</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3309874475194892630.post-9211699567065617319</guid><pubDate>Sat, 22 Oct 2011 23:56:00 +0000</pubDate><atom:updated>2013-03-03T23:17:14.347-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">JavaScript</category><category domain="http://www.blogger.com/atom/ns#">JavaScript Calculator</category><title>JavaScript Calculator</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;div class=&quot;g-plusone&quot; data-annotation=&quot;inline&quot; data-width=&quot;300&quot;&gt;
&lt;/div&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
  (function() {
    var po = document.createElement(&#39;script&#39;); po.type = &#39;text/javascript&#39;; po.async = true;
    po.src = &#39;https://apis.google.com/js/plusone.js&#39;;
    var s = document.getElementsByTagName(&#39;script&#39;)[0]; s.parentNode.insertBefore(po, s);
  })();
&lt;/script&gt;

&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;form&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;&lt;input onclick=&quot;window.location.href=&#39;http://www.elcricottocircle.blogspot.com/&#39;&quot; type=&quot;BUTTON&quot; value=&quot;HOME PAGE         &quot; /&gt; 
&lt;/span&gt;&lt;/form&gt;
&lt;/div&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;REVISED: Monday, March 3, 2013&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: 800;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjF2fpl5GpnnvjfP1iTFYMill4Ay2foooNMoqsJK1KAx1fonfo_gAwPRUag9oje3ZIkHzFPTUsrsl_G2gO8_9QCqLnUqZwKJ7R6jM-Tkzu6bEBRfuD3loFtIkEzpX-b78owPityGVwJeR8/s1600/avatar.gif&quot; imageanchor=&quot;1&quot; style=&quot;font-weight: bold; margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjF2fpl5GpnnvjfP1iTFYMill4Ay2foooNMoqsJK1KAx1fonfo_gAwPRUag9oje3ZIkHzFPTUsrsl_G2gO8_9QCqLnUqZwKJ7R6jM-Tkzu6bEBRfuD3loFtIkEzpX-b78owPityGVwJeR8/s1600/avatar.gif&quot; /&gt;&lt;/a&gt;
&lt;/div&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;

&lt;br /&gt;
&lt;br /&gt;
Shown below is a JavaScript Calculator:&lt;br /&gt;
&lt;br /&gt;
&lt;script language=&quot;Javascript&quot;&gt;
 

&lt;!--

 

function parsetext(text) {

 text = text.replace(/%/g, &#39;*0.01&#39;);

 text = text.replace(/\[|\{/g, &#39;(&#39;);

 text = text.replace(/\]|\}/g, &#39;)&#39;);

 return eval(text);

}

 

function compute(form) {

 form.result.value = &#39; &#39;

 evtext = parsetext(form.expression.value);

 form.result.value = evtext.toString().substring(0, 6);

} // end compute

 

// &lt;/script&gt; 
&lt;/div&gt;
--&amp;gt;







This JavaScript calculator has the usual precedence rules; however, use parentheses.&lt;br /&gt;
&lt;br /&gt;
&lt;form&gt;
Calculator: &lt;input name=&quot;expression&quot; onchange=&quot;compute(this.form)&quot; onkeyup=&quot;compute(this.form)&quot; size=&quot;50&quot; type=&quot;text&quot; value=&quot;(1 + 2) * 3 + 4&quot; /&gt;
&lt;br /&gt;
Result: &lt;input name=&quot;result&quot; size=&quot;5&quot; type=&quot;text&quot; value=&quot;&quot; /&gt; &lt;input name=&quot;computeButton&quot; onclick=&quot;compute(this.form)&quot; type=&quot;button&quot; value=&quot;Compute!&quot; /&gt;
 &lt;/form&gt;
&lt;hr style=&quot;height: 2px; width: 100%;&quot; /&gt;
&lt;div&gt;
&lt;b style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 9px;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif;&quot;&gt;&lt;a href=&quot;http://goo.gl/qi5jw&quot; style=&quot;color: #33aaff;&quot;&gt;Elcric Otto Circle&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 9px;&quot;&gt;&lt;br /&gt;&lt;/b&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
&lt;!--
google_ad_client = &quot;ca-pub-4871588942132101&quot;;
/* One */
google_ad_slot = &quot;8813220342&quot;;
google_ad_width = 336;
google_ad_height = 280;
//&lt;/script&gt;
&lt;/div&gt;
--&amp;gt;
&lt;script src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot; type=&quot;text/javascript&quot;&gt;
&lt;/script&gt;

&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
&lt;!--
google_ad_client = &quot;ca-pub-4871588942132101&quot;;
/* Two */
google_ad_slot = &quot;8243854886&quot;;
google_ad_width = 336;
google_ad_height = 280;
//&lt;/script&gt;
&lt;/div&gt;
--&amp;gt;
&lt;script src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot; type=&quot;text/javascript&quot;&gt;
&lt;/script&gt;

&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
&lt;!--
google_ad_client = &quot;ca-pub-4871588942132101&quot;;
/* Three */
google_ad_slot = &quot;7921082405&quot;;
google_ad_width = 336;
google_ad_height = 280;
//&lt;/script&gt;
&lt;/div&gt;
--&amp;gt;
&lt;script src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot; type=&quot;text/javascript&quot;&gt;
&lt;/script&gt;

&lt;br /&gt;
&lt;div&gt;
&lt;form&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;&lt;input onclick=&quot;window.location.href=&#39;http://www.elcricottocircle.blogspot.com/&#39;&quot; type=&quot;BUTTON&quot; value=&quot;HOME PAGE         &quot; /&gt; 
&lt;/span&gt;&lt;/form&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;h1&gt;
How to Link to My Home Page&lt;/h1&gt;
&lt;form action=&quot;http://www.example.com/&quot;&gt;
&lt;label for=&quot;linkcode&quot;&gt;
To link to &quot;MY Home Page&quot; from your website, simply copy and paste the following code into your website HTML page.
&lt;/label&gt;
&lt;textarea cols=&quot;43&quot; id=&quot;linkcode&quot; onclick=&quot;this.focus();this.select();&quot; readonly=&quot;readonly&quot; rows=&quot;5&quot; title=&quot;Select the text here, click your right mouse button, click the Copy menu item, and paste it into your web page in HTML source mode&quot;&gt;&lt;a href=&quot;http://goo.gl/Hm4Lb&quot; target=&quot;_top&quot;&gt;&quot;Link to ELCRIC OTTO CIRCLE&#39;s Home Page&quot;&lt;/a&gt;
&lt;/textarea&gt;
&lt;/form&gt;
It will appear on your website as:&lt;br /&gt;
&lt;a href=&quot;http://goo.gl/Hm4Lb&quot; target=&quot;_top&quot;&gt;&quot;Link to ELCRIC OTTO CIRCLE&#39;s Home Page&quot;&lt;/a&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</description><link>http://javascriptelcric.blogspot.com/2011/10/my-first-web-page-document.html</link><author>noreply@blogger.com (Ron Tinnel)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjF2fpl5GpnnvjfP1iTFYMill4Ay2foooNMoqsJK1KAx1fonfo_gAwPRUag9oje3ZIkHzFPTUsrsl_G2gO8_9QCqLnUqZwKJ7R6jM-Tkzu6bEBRfuD3loFtIkEzpX-b78owPityGVwJeR8/s72-c/avatar.gif" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3309874475194892630.post-3326253036879934275</guid><pubDate>Sat, 22 Oct 2011 16:16:00 +0000</pubDate><atom:updated>2013-03-03T23:18:39.768-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">assignment operator</category><category domain="http://www.blogger.com/atom/ns#">comments</category><category domain="http://www.blogger.com/atom/ns#">JavaScript</category><category domain="http://www.blogger.com/atom/ns#">JavaScript examples</category><category domain="http://www.blogger.com/atom/ns#">variables</category><title>JavaScript Introduction</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;div class=&quot;g-plusone&quot; data-annotation=&quot;inline&quot; data-width=&quot;300&quot;&gt;
&lt;/div&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
  (function() {
    var po = document.createElement(&#39;script&#39;); po.type = &#39;text/javascript&#39;; po.async = true;
    po.src = &#39;https://apis.google.com/js/plusone.js&#39;;
    var s = document.getElementsByTagName(&#39;script&#39;)[0]; s.parentNode.insertBefore(po, s);
  })();
&lt;/script&gt;

&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;form&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;&lt;input onclick=&quot;window.location.href=&#39;http://www.elcricottocircle.blogspot.com/&#39;&quot; type=&quot;BUTTON&quot; value=&quot;HOME PAGE         &quot; /&gt; 
&lt;/span&gt;&lt;/form&gt;
&lt;/div&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;REVISED: Sunday, March 3, 2013&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: 800;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjF2fpl5GpnnvjfP1iTFYMill4Ay2foooNMoqsJK1KAx1fonfo_gAwPRUag9oje3ZIkHzFPTUsrsl_G2gO8_9QCqLnUqZwKJ7R6jM-Tkzu6bEBRfuD3loFtIkEzpX-b78owPityGVwJeR8/s1600/avatar.gif&quot; imageanchor=&quot;1&quot; style=&quot;font-weight: bold; margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjF2fpl5GpnnvjfP1iTFYMill4Ay2foooNMoqsJK1KAx1fonfo_gAwPRUag9oje3ZIkHzFPTUsrsl_G2gO8_9QCqLnUqZwKJ7R6jM-Tkzu6bEBRfuD3loFtIkEzpX-b78owPityGVwJeR8/s1600/avatar.gif&quot; /&gt;&lt;/a&gt;
&lt;/div&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: Verdana, sans-serif; font-weight: bold;&quot;&gt;I. &amp;nbsp;JAVASCRIPT&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;A. &amp;nbsp;Programming Tool&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange; font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;1. &amp;nbsp;Statements&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
JavaScript is a scripting language that gives HTML designers a programming tool.&lt;/div&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;A JavaScript statement is a command to a browser.&lt;/span&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;It is normal to add a semicolon at the end of each executable statement.&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Each statement is executed by the browser in the sequence they are written.&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
JavaScript statements can be grouped together in blocks. &amp;nbsp;Blocks start with a left curly bracket {, and end with a right curly bracket }&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; font-family: verdana, helvetica, arial, sans-serif; font-size: 12px;&quot;&gt;.&lt;/span&gt;&amp;nbsp; A block is used to group statements together in a function or in a condition, where a group of statements should be executed if a condition is met.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;JavaScript is case sensitive.&lt;/span&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;JavaScripts can be put in the &amp;lt;body&amp;gt; and in the &amp;lt;head&amp;gt; sections of an HTML page.&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange; font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;2. &amp;nbsp;Comments&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Single line JavaScript comments start with //.&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt; Multi line comments start with /* and end with */.&lt;/span&gt;&lt;/div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange; font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;3. &amp;nbsp;Rules for&amp;nbsp;Variables&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
You declare JavaScript variables with the var keyword.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Variable names are case sensitive; z and Z are two different variables.&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
Variable names must begin with a letter or the underscore character.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
When you assign a text value to a variable, use quotes around the value.&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
A variable declared within a JavaScript function becomes LOCAL and can only be accessed within that function.&amp;nbsp; Local variables are destroyed when you exit the function.&amp;nbsp; Variables declared outside a function become GLOBAL.&amp;nbsp;&amp;nbsp;Global variables are destroyed when you close the page. &amp;nbsp;If you declare a variable, without using &quot;var&quot;, the variable always becomes GLOBAL.&amp;nbsp; If you assign values to variables that have not yet been declared, the variables will automatically be declared as global variables.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange; font-family: Verdana, sans-serif; font-weight: bold;&quot;&gt;4. &amp;nbsp;Assignment Operators&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;Given x=20 and y=10 then:&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;Assignment &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; x=y &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;x=y &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;x=10 &amp;nbsp; &amp;nbsp; y=10&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;Addition &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; += &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; x+=y &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;x=x+y &amp;nbsp; &amp;nbsp; &amp;nbsp;x=30 &amp;nbsp; &amp;nbsp; y=10&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;Subtraction &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-= &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; x-=y &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; x=x-y &amp;nbsp; &amp;nbsp; &amp;nbsp; x=10 &amp;nbsp; &amp;nbsp; y=10 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;Multiplication &amp;nbsp; &amp;nbsp; *= &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;x*=y &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;x=x*y &amp;nbsp; &amp;nbsp; &amp;nbsp; x=200 &amp;nbsp; y=10&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;Division &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;/= &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; x/=y &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; x=x/y &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;x=2 &amp;nbsp; &amp;nbsp; &amp;nbsp; y=10&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;Modulus &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; %= &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; x%=y &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; x=x%y &amp;nbsp; &amp;nbsp; &amp;nbsp;x=0 &amp;nbsp; &amp;nbsp; &amp;nbsp; y=10&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;Increment &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;++ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;x=++y &amp;nbsp; &amp;nbsp; &amp;nbsp; x=11 &amp;nbsp; &amp;nbsp; y=11&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;x=y++ &amp;nbsp; &amp;nbsp; &amp;nbsp; x=10 &amp;nbsp; &amp;nbsp; y=11 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;Decrement &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;x=--y &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; x=9 &amp;nbsp; &amp;nbsp; &amp;nbsp; y=9&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;x=y-- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;x=10 &amp;nbsp; &amp;nbsp; y=9&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;B. &amp;nbsp;Uses&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
JavaScript can be used to:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange; font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;1. &amp;nbsp;React&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
React to events such as when a page has finished loading or when a user clicks on an HTML element.&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange; font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;2. &amp;nbsp;Read and Write&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Read and write HTML elements.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange; font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;3. &amp;nbsp;Validate&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Validate form data before it is submitted to a server. This saves the server from extra processing.&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange; font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;4. &amp;nbsp;Detect&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Detect the visitor&#39;s browser.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange; font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;5. &amp;nbsp;Create&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Create cookies and store and retrieve information on the visitor&#39;s computer.&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;C. &amp;nbsp;Browser Support&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: inherit;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;Some Browsers do Not Support JavaScript.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;Browsers that do not support JavaScript, will display JavaScript as page content.&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;To prevent them from doing this, and as a part of the JavaScript standard, the HTML comment tag should be used to &quot;hide&quot; the JavaScript.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;Just add an HTML comment tag &amp;lt;!-- before the first JavaScript statement, and a --&amp;gt; (end of comment) after the last JavaScript statement, as shown in the first example below:&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: Verdana, sans-serif; font-weight: bold;&quot;&gt;II. &amp;nbsp;JAVASCRIPT EXAMPLES&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-family: Verdana, sans-serif;&quot;&gt;A. &amp;nbsp;Date Button&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
The following is an example of using JavaScript to create a button that displays the date:&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;&lt;/b&gt;&lt;/div&gt;
&lt;b&gt;&lt;span style=&quot;color: purple;&quot;&gt;&amp;lt;html&amp;gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: purple;&quot;&gt;&amp;lt;head&amp;gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: purple;&quot;&gt;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;span style=&quot;color: purple;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;&amp;lt;!--&lt;/b&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: purple;&quot;&gt;function displayDate()&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: purple;&quot;&gt;{&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: purple;&quot;&gt;document.getElementById(&quot;demo&quot;).innerHTML=Date();&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;span style=&quot;color: purple;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;//--&amp;gt;&lt;/b&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: purple;&quot;&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: purple;&quot;&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: purple;&quot;&gt;&amp;lt;body&amp;gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;span style=&quot;color: purple;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;&amp;lt;h1&amp;gt;Please left click button for today&#39;s date:&amp;lt;/h1&amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: purple;&quot;&gt;&amp;lt;p id=&quot;demo&quot;&amp;gt;JavaScript Date Button.&amp;lt;/p&amp;gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;span style=&quot;color: purple;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;&amp;lt;button type=&quot;button&quot; onclick=&quot;displayDate()&quot;&amp;gt;Display Date&amp;lt;/button&amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: purple;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;&amp;lt;/body&amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: purple;&quot;&gt;&amp;lt;/html&amp;gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange; font-family: Verdana, sans-serif;&quot;&gt;EXAMPLE OUTPUT:&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;Sat Oct 22 2011 19:20:11 GMT-0400 (Eastern Daylight Time)&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;
&lt;b style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 9px;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif;&quot;&gt;&lt;a href=&quot;http://goo.gl/qi5jw&quot; style=&quot;color: #33aaff;&quot;&gt;Elcric Otto Circle&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
&lt;!--
google_ad_client = &quot;ca-pub-4871588942132101&quot;;
/* Two */
google_ad_slot = &quot;8243854886&quot;;
google_ad_width = 336;
google_ad_height = 280;
//&lt;/script&gt;
&lt;/div&gt;
&lt;/div&gt;
--&amp;gt;
&lt;script src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot; type=&quot;text/javascript&quot;&gt;
&lt;/script&gt;

&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
&lt;!--
google_ad_client = &quot;ca-pub-4871588942132101&quot;;
/* Three */
google_ad_slot = &quot;7921082405&quot;;
google_ad_width = 336;
google_ad_height = 280;
//&lt;/script&gt;
&lt;/div&gt;
--&amp;gt;
&lt;script src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot; type=&quot;text/javascript&quot;&gt;
&lt;/script&gt;

&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;form&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;&lt;input onclick=&quot;window.location.href=&#39;http://www.elcricottocircle.blogspot.com/&#39;&quot; type=&quot;BUTTON&quot; value=&quot;HOME PAGE         &quot; /&gt; 
&lt;/span&gt;&lt;/form&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;h1&gt;
How to Link to My Home Page&lt;/h1&gt;
&lt;form action=&quot;http://www.example.com/&quot;&gt;
&lt;label for=&quot;linkcode&quot;&gt;
To link to &quot;MY Home Page&quot; from your website, simply copy and paste the following code into your website HTML page.
&lt;/label&gt;
&lt;textarea cols=&quot;43&quot; id=&quot;linkcode&quot; onclick=&quot;this.focus();this.select();&quot; readonly=&quot;readonly&quot; rows=&quot;5&quot; title=&quot;Select the text here, click your right mouse button, click the Copy menu item, and paste it into your web page in HTML source mode&quot;&gt;&lt;a href=&quot;http://goo.gl/Hm4Lb&quot; target=&quot;_top&quot;&gt;&quot;Link to ELCRIC OTTO CIRCLE&#39;s Home Page&quot;&lt;/a&gt;
&lt;/textarea&gt;
&lt;/form&gt;
It will appear on your website as:&lt;br /&gt;
&lt;a href=&quot;http://goo.gl/Hm4Lb&quot; target=&quot;_top&quot;&gt;&quot;Link to ELCRIC OTTO CIRCLE&#39;s Home Page&quot;&lt;/a&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</description><link>http://javascriptelcric.blogspot.com/2011/10/blog-post.html</link><author>noreply@blogger.com (Ron Tinnel)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjF2fpl5GpnnvjfP1iTFYMill4Ay2foooNMoqsJK1KAx1fonfo_gAwPRUag9oje3ZIkHzFPTUsrsl_G2gO8_9QCqLnUqZwKJ7R6jM-Tkzu6bEBRfuD3loFtIkEzpX-b78owPityGVwJeR8/s72-c/avatar.gif" height="72" width="72"/><thr:total>0</thr:total></item></channel></rss>