Frontend Development
JavaScript Lessons 1: Introduction to JavaScript - What is JavaScript?
Submitted by BURST, 15-12-2018, 09:14 PM, Thread ID: 109612
Thread Closed
15-12-2018, 09:14 PM
#1 What is JavaScript?
Javascript is developed by Netscape . Although it seems close to java because of the name they are far from each other. Javascript is a script language rather than a programming language.
It is written into html pages, making the page more interactive. For example, click events, such as warning messages, make the page more dynamic . What can be done with html pages written without Javascript is limited.
For those who want to become a web developer is a script to learn . Of course, you need to have good html-css information before that. I think it would be enough to separate your 2 days for the html-css duo. There are many html-css trainings that are good on the Internet .
Javascript code is written between the <script> Javascript </ script> tags. They are embedded in the <body> tag within the html page . It can also be written after the <head> tag instead .
Let's finish with a simple example after a short introduction.
1) First let's go through basic html codes.
javascript lessons
Open the Notepad ++ or notepad program and type the above codes. From the upper-left corner , select File -> Save As , and save the extension as .html . For example, trial.html
Right click on this .html file and a blank page will appear when you open it in the browser. Because we didn't write anything on the body . In Body , we write what we want to appear on our page. Head tags include the title of our page , import operations, etc. we do.
2) Now let's see how we use our javascript codes. It was a slightly previous plain html page.
javascript lessons
We wrote the <script> tags between our body tags and finally closed with </ script> . We write our javascript code between these <script> tags . I've done the print on the screen here. In Javascript, screen printing is printed with document.write () .
We added type = text / javascript to the <script> tag . We've specified that javascript is used here. We also write the <meta charset = 'utf-8'> tag at the head, so that we have a Turkish character shortage.
If we save the code after writing it and run the html extension page again (page refresh can be done) we get the following output.
javascript lessons
Users browsing this thread: 2 Guest(s)