Skip to main content

Building your Fist JavaScript Application!



JavaScript is what is called a Client-side Scripting Language. That means that it is a computer programming language that runs inside an Internet browser (a browser is also known as a Web client because it connects to a Web server to download pages).

The way JavaScript works is interesting. Inside a normal Web page you place some JavaScript code . When the browser loads the page, the browser has a built-in interpreter that reads the JavaScript code it finds in the page and runs it.

Web page designers use JavaScript in many different ways. One of the most common is to do field validation in a form. Many Web sites gather information from users in online forms, and JavaScript can help validate entries. For example, the programmer might validate that a person's age entered into a form falls between 1 and 120. Another way that web page designers use JavaScript is to create calculators.

Now its time to built your own javascript calculator!
The following code represents a simple Fahrenheit to Celsius converter using JavaScript.

Click here to Read full artcile and get the source code for this simple calculator application

Getting the magic done!

  1. Copy and paste the HTML coding whihc you see from the above link, to the notepad
  2. Go to Files > Save As

  3. Select All Files > and type the following name

  4. Calculator.html > Save it in your Desktop! (.html is very important!)

  5. Go to your Desktop, now you will see a Webpage known as Calculator, Double-Click, Wow! thats It! your calculator is up and running!

You just wrote your First JavaScript Application, now go to the code and try to undastand what actually happened! Hope to see you with some more tips on JavaScrpt! Keep Visiting >>Windhu Blog>>


Comments

Popular posts from this blog

Dhivehi to English translation with Microsoft translator

  The Dhivehi language translation feature included in Microsoft translator and Microsoft 365 lets you press a button and translate written Dhivehi into English. Though there are a few hiccups here and there, the service is great and provides an understanding of the overall document. This is more than what we see from any existing models. I was amazed to see a link in one of my outlook web emails, it says “translate message to: English” which could mean nothing usually, however, when I saw the next sentence which said “Never translate from: Divehi”, I thought why would it says Divehi specifically if it doesn’t understand that the entire email was written in Dhivehi? Out of curiosity, I pressed the button, and to my surprise, it was quite good. The essence of the message was retained very well. For example, something like އިޙްތިރާމް ޤަބޫލުކުރެއްވުން އެދެން could be translated as “ I would like to respect you ”, which is ok in terms of translation, but what it meant was greeti...

Why when shared, Windows XP cannot communicate with winodws Vista in the Same Local network?

Network Map in Microsoft® Windows Vista™ diagrams the connections between network devices to help you troubleshoot connectivity problems. Network Map uses a discovery protocol called Link-Layer Topology Discovery (LLTD) in order to query the other devices on the network to determine how the network is organized. Computers running Windows Vista include the software components that implement the LLTD protocol. For other devices on the network to be placed on the map, they must have a discovery protocol enabled that can respond to the mapping computer's requests. This means in order to communicate windows Xp with Windows Vista we need to install a Portocol known as LLTD from microsoft website, unfortunately only licensed versions of widnows XP can download and install this protocol from microsoft website? "Too bad, Our poor, pirated copy users have to face the dificulties.... " but why most of the asians always use pirated copies of any software they USE? But if u crack wind...

Fortifying Cybersecurity: A NIST CSF Perspective on Zero Trust and Passkeys

Cybersecurity is like protecting a fortress from invaders. Traditionally, we built strong walls around our castle, trusting those inside and keeping potential threats outside. But in today's digital world, threats can come from within and outside, making traditional defences inadequate. This is where the concept of zero trust comes in. What is Zero Trust? Imagine your home. You don't blindly trust everyone who walks in, right? You might ask for identification or make sure they have a reason to be there. Zero trust is similar. It means not automatically trusting anyone or anything trying to access your digital "home" (like your network or data). Instead, it's about constantly verifying and monitoring every access attempt, regardless of where it comes from. Why Zero Trust Matters: Zero trust addresses three key goals in cybersecurity, often called the CIA triad: Confidentiality : Just like you wouldn't want strangers snooping through your person...