Friday , 16 November 2018
Home / Tag Archives: all (page 7)

Tag Archives: all

Change CSS – JavaScript Tutorial

Change CSS

JavaScript not only allows you to change the HTML in your document, but you can also change the styles of a certain element. The procedure to change CSS is straightforward. Let’s look at how to do this. Updating the HTML Update the <body> tags in your HTML document to this. [crayon-5beeb91dcb286858605412/] Next, let’s clear your script and add this bit …

Read More »

Change HTML Attributes – JavaScript Tutorial

Change HTML Attributes

We learned how to change the HTML inside elements. What if we wanted to the change the HTML attributes? This is very easy to do. First, update the <body> tags inside your HTML document to this. [crayon-5beeb91dcc66a653450857/] What we’re going to do is grab the anchor tag’s link and change it with another link. Now that our HTML document is …

Read More »

Manipulating Elements – JavaScript Tutorial

Manipulating Elements

Now that we know how to grab an HTML tag, let’s talk about manipulating the data inside. Manipulating elements is fairly easy. So, let’s first clear out our script. Then, add this bit of code. [crayon-5beeb91dcce90586779413/] Just like last time, we store the tags inside a variable. Since there are 3 paragraph tags inside the HTML document, there has to …

Read More »

HTML DOM – JavaScript Tutorial

HTML DOM

We’re finished with talking about object oriented programming in JavaScript for now. We’re going to talk about the HTML DOM. As I stated in the first tutorial, you should have a good understanding of HTML and CSS. If not, then go learn HTML and CSS. These next couple of tutorials depend on that knowledge. What is the HTML DOM? DOM …

Read More »

Prototypes – JavaScript Tutorial

Prototypes

Prototypes in JavaScript can get very complex. There’s a lot to go over. In this tutorial, we’ll only talk about the basics and it’s use for creating methods or properties after the creation of the object. Whenever you drive a car, the amount of mileage goes up. So, let’s create a property that will hold the mileage and create a …

Read More »

Creating Properties and Methods – JavaScript Tutorial

Creating Properties and Methods

In this tutorial, we will be working with the Car class we created in the last tutorial. You’ll learn how to create properties and methods. Creating properties and methods in JavaScript is relatively simple. Creating A Property As previously discussed, a property is just a variable for an object. Creating a property in an object is different than creating a …

Read More »

Creating Objects – JavaScript Tutorial

Creating Objects

Object oriented programming is a style of programming. JavaScript will read your code from top to bottom and execute it in that order. This is what’s called procedural code. Object oriented programming doesn’t work this way. Instead, it’s built on the concept of “objects”. For the most part, object oriented programming is viable for advance or large projects. It helps …

Read More »

Math Object – JavaScript Tutorial

Math Object

The math object is another object you’ll find yourself using often. It allows you to perform advance math operations. It can really save you time and you don’t have to write as much code. Math Object Properties Let’s get started. Clear your script and add this bit of code. [crayon-5beeb91dcfa0f456967956/] You do not have to create an instance of the …

Read More »

Date Object – JavaScript Tutorial

Date Object

The date object is a very special object. It allows you to grab the current time and date. It also allows you to manipulate the time and date easily. Let’s take a look at how useful the date object can be. In order to use the date object, you have to store the instance of the object inside a variable. …

Read More »

String Object – JavaScript Tutorial

String Object

The string object is another object built in by JavaScript. Whenever you create a string, JavaScript will automatically give it the properties and methods of a string. To clarify a few things, you can sometimes access an object directly without having to create a variable. We saw how to do this with the number object, but with the string object …

Read More »