Js Section 1-js attribute operations
Js Section 1-js attribute operations today we will talk about js attribute operations in Section 1. What are attributes? An attribute is a description of a thing, such as its id and value of an element. Each element has its own attributes and the attributes we define for it-Custom Attributes. In short, these attributes describe the unique characteristics of its elements. Now, I will explain to you what js attribute operations are through two instances. I. The first example is: Image carousel:
Figure 1: Loading
Figure 2: HTML code and CSS code after loading:
JS Code:
Var oId = document. getElementById ("attribute id');, which is used to obtain an element with an id. index = 0; this is an attribute not available to the element itself-it is called a custom attribute. A custom attribute is generally used as an array with many index values.
II. The second instance is: Message sending
:
Figure 3: HTML and CSS code for message sending:
JS Code:
Startup club '; this is the write operation. In the next section, we will talk about the application of the for Loop in js.