- Joined
- Aug 22, 2023
- Messages
- 51
- Reaction score
- 8
I have began a collection of 'Mandatory Elements To Conduct JavaScript Form Manipulation'.
-I hope that this can be an accessible aid for individuals that are unfamiliar with the language.
-addEventListener("", varorfunctionName)
1: addEventListener specifies what will transpire when something is conducted by the user. It is a mandatory element to evoke response from user input.
2: document.getElementById, Tag Name, or Class Name receives information (that will perhaps be manipulated) from a particular element. Computer programmers are fond of changing the innerText, innerHTML, or textContent of these manipulated elements.
3: The 'var' element is simply assigning something a variable so that it can be referred to in later functions & statements. Atop, I changed the text content of a particular element that possessed an HTML5 Id.
4: textContent, innerText, or innerHTML: Of course, these are all entirely different elements! Nonetheless, they all specify something that could undoubtedly possibly be text! textContent specifies merely text, whatever that text might be! innerHTML, of course, relates to nested elements amidst the HTML5 code. innerText specifies text contained in, distinctly, an element, rather than any sentence that you might find amidst HTML5 coding.
5: function(): If one would like to conduct an occurrence or the result of user input, they would create a function to conduct these things!
6: if, elseif: If a browser receives particular user information, it might begin a program to institute accessibility to the site. if, the user had a sophisticated understanding of a particular thing, one might like to easily access information regarding these things. if the browser received another solution, something different would happen. This particular programming philosophy would be referred to as 'personalization'.
-This is admittedly not a very satisfactory list, and, one can certainly become more familiar and knowledge regarding these things using various academic applications.
-I hope that this can be an accessible aid for individuals that are unfamiliar with the language.
-addEventListener("", varorfunctionName)
1: addEventListener specifies what will transpire when something is conducted by the user. It is a mandatory element to evoke response from user input.
Code:
document.getElementById("").addEventListener("click", function() {
}
2: document.getElementById, Tag Name, or Class Name receives information (that will perhaps be manipulated) from a particular element. Computer programmers are fond of changing the innerText, innerHTML, or textContent of these manipulated elements.
Code:
var someVar = document.getElementById("that-id");
someVar.textContent = "Hello, world!";
3: The 'var' element is simply assigning something a variable so that it can be referred to in later functions & statements. Atop, I changed the text content of a particular element that possessed an HTML5 Id.
Code:
var heyMan = document.getElementByClassName("hi");
if (heyMan === "Hello, Friends") {
heyMan.innerHTML = "Hello, yet again!";
}
4: textContent, innerText, or innerHTML: Of course, these are all entirely different elements! Nonetheless, they all specify something that could undoubtedly possibly be text! textContent specifies merely text, whatever that text might be! innerHTML, of course, relates to nested elements amidst the HTML5 code. innerText specifies text contained in, distinctly, an element, rather than any sentence that you might find amidst HTML5 coding.
Code:
coolVar. innerText = "Remarkable. An extraordinary ideal that I will suggest to all of my friends and acquaintances!";
Code:
function() {
//if, elseif
}
Code:
if (this = "that") {
//This would, of course, be determined by whatever one was trying to accomplish!
}
else if (this = "this") {
//A different ultimate solution.
}
-This is admittedly not a very satisfactory list, and, one can certainly become more familiar and knowledge regarding these things using various academic applications.