5 minute(s) read
Published on: Jun 04, 2021
Updated on: Dec 14, 2021
You definitely know that programming can provide you with a good income, and in addition to the good income you can have from this way, it also allows you to not get tired while doing work and continue to work with interest, due to the fact that there is so much variety in this world and if you are interested in it, you can continue your journey with pleasure.
It is a language that is used to implement a variety of complex features in web pages and causes complex applications to run on web pages which encourages the user to visit those pages and also due to the high interaction that the user can have with the page with the help of this language, they will gain a positive user experience, so that you can attract lots of users to your website day by day.
When defining a function "this" is pointing to the owner of the function, so that you can better understand the example below.
Methods in this language are actually operations that can be done on objects.
This method can be used for text strings.
Adding a Method to an Object:
One of the easiest things to do in this section is to add a method to objects.
Properties are actually values associated with an object, these properties can be changed, added and deleted or may have none of these capabilities and can only be read, in order to add these properties to objects, it is necessary to follow the rules below.
Another possibility that exists in this field is that you can delete or remove various properties.
Adding New Properties:
In simple terms, it means the occurrence of an event that occurs on a web page after which, the JS interpreter identifies it and finally shows a reaction according to that event, it should be noted that in general each function is connected to one or more events, now consider the following example.
There are three ways to attribute an event to an element, as follows which we are going to mention below.
- Using the event with addEventListener and removeEventListener
- Using the event with an independent Event Handler outside the HTML coding - Using the event with Inline Event Handler and combine with HTML coding
There are several commonly used events, some of which are listed below.
This is one of the most commonly used events that can happen on web pages, in fact this event refers to a time when a target element on a web page is double-clicked in a very short period of time.
As its name implies, this event refers to when the target element is clicked on the web page.
This event occurs when the target element on the web page becomes focused, in which case you should keep in mind that not all elements on the web page can be focused.
Among the most common events that may occur on web pages, it occurs when the user holds down a key on the keyboard.
This will also happen when the user releases the pressed button.
This event also occurs when the mouse pointer enters within the specified range of the element.
This event will also occur when the mouse pointer is moved within the specified range of the element.
This will happen when the mouse pointer goes out of range of the element.
This event will occur when the resource is fully loaded.
This event will occur when you try to copy content.
It happens by cutting content from the source of the event.
This event will occur when the page or also an element is scrolled.
There are many frequently used events, including the one that will occur when you submit a form.
method objects, properties and events in JS programming language are some of the items that each of them are of a great importance, and it is necessary to have the mastery of all items in this language, including these items, in order to be successful, in this article we have mentioned some points in relation to each item, we hope that the information which have been provided can be helpful for you.Click to analyze your wesbite SEO