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...

Google dialogflow - How to train a chatbot to answer questions related to your office and how to make it better than just a Q&A bot?

  First lets look how to do it the basic way. To train a conversational AI chatbot for answering office-related queries using Dialogflow, you will need to follow these steps: Create a new agent in Dialogflow. Collect a dataset of office-related queries and their corresponding answers. This dataset can be obtained through various means, such as scraping websites, conducting surveys, or manually creating a dataset. Create intents in Dialogflow for the queries in your dataset. An intent represents a user's intention, such as asking for office hours or requesting a vacation day. Add training phrases to each intent, which are examples of how a user might ask the question. Provide responses for each intent, which will be the chatbot's answer to the user's query. Test the chatbot using the "Try it now" feature in Dialogflow. Once the chatbot is working well, you can deploy it to a platform of your choice, such as a website or mobile app. However, if you follow the basic ...

Is IT no longer about technology?

Author: Jason Hiner Writes... It’s become horribly cliche to talk about the importance of IT-business alignment and the need for IT professionals to become much more business-savvy, but Gartner’s Tom Austin (right) takes it to the next level. He believes that the IT professional of the future will be less of an engineer and more of a social scientist. What? Yes, you heard that right — the word “social” will become a key part of the IT professional’s job description. It flies in the face of most of the stereotypes about techies and it sounds a little corny, but Austin does draw some interesting conclusions that are worth a look, if only because they are so unconventional. Here are some of the most salient quotes from Austin on this subject (from an interview in Fast Company ): “The problem with IT today is there are too many engineers and not enough social scientists.” “Too often, we have measurement and reward systems that are focused on how many transactions did you process, how man...