728x90
SMALL

Javascript 28

JavaScript 카운트 다운 숫자증가 애니메이션

html D-DAY - 일 : - 시간 : - 분 : - 초 D-DAY -일 -시간 -분 -초 클래스 명으로 CSS 디자인을 적용시켜주었다. 원래는 시간을 나타내는 숫자에는 같은 ID를 사용했다가 구조상의 문제로 다 각각 만들어주었다. 두개를 한페이지에 한번에 사용하지 않는다면 id를 공통으로 줘도 작동한다.(같이 사용한다하면 js에서 querySelectorAll을 사용하면 되긴한다.) 시작시에는 -에서 시작 되도록 만들었다. CSS .timer-background { width: 100%; height: 124px; /* 백그라운드 색 코드를 아래 background-color에 넣어주시면 됩니다 */ background-color: #399bfe; text-align: center; font-siz..

Javascript 2023.06.13

[Javascript] JavaScript/Object/Array.join()/Concatenate array elements into one value

#javascript #JavaScript/Object/Array.join()/Concatenate array elements into one value .join() .join() concatenates the elements of an array into a single value. grammar var jbStr1 = jbAry.join(); Makes the elements of the jbAry array one value. Separate elements with a comma (,). To separate elements with a different character, put the desired character inside the (). var jbStr2 = jbAry.join( ' ..

Javascript 2022.08.27

[Javascript] JavaScript / Object / Array.indexOf(), Array.lastIndexOf() - methods that return the position (index) of the matching element

#javascript #JavaScript / Object / Array.indexOf(), Array.lastIndexOf() - methods that return the position (index) of the matching element .indexOf() .indexOf() is a method that returns the index of the element that matches the given value. Grammar array. indexOf( value, start ) value: Enter the value to search for. start : The index value to start searching. Optional, if omitted the value is 0...

Javascript 2022.08.26

[Javascript] JavaScript/Object/Array.every()/Method to check if every element meets a condition

#Javascript #JavaScript/Object/Array.every()/Method to check if every element meets a condition .every() .every() is a method that checks whether all elements in an array meet a condition. Returns true if all elements satisfy the condition, false otherwise. example Check the elements of the array in ascending order, stop checking if any element does not satisfy the condition, and return false. R..

Javascript 2022.08.25

[Javascript] JavaScript / Object / Array.concat() / Add elements or arrays to an existing array to create a new array

#Javascript #JavaScript / Object / Array.concat() / Add elements or arrays to an existing array to create a new array .concat() You can use the .concat() property to add elements or arrays to an existing array to create a new array. grammar var jbAry2 = jbAry1.concat( 'abc' ); Add the string abc to the jbAry1 array to create the jbAry2 array. var jbAry3 = jbAry1.concat( jbAry2 ); Sum two arrays ..

Javascript 2022.08.24

[Javascript] JavaScript/Object/Array.length/Property that returns the length of the array

#Javascript #JavaScript/Object/Array.length/Property that returns the length of the array .length .length is an attribute that returns the length of the array. Returns a number one greater than the index value of the last element. It has a different meaning than the number of elements belonging to the array. grammar array.length example The index value of the last element of array jbAry1 is 3, s..

Javascript 2022.08.23

[JavaScript] JavaScript / Event / onsubmit / Event that causes a task to run before submitting the form

#JavaScript #JavaScript / Event / onsubmit / Event that causes a task to run before submitting the form JavaScript's onsubmit event allows you to do something before submitting the form values. Let's see how it works with a simple example. Example 1 Create a simple membership registration page. The transfer button is created with an input tag. Click Register and it will take you to ok.html. Regi..

Javascript 2022.08.10

[JavaScript] JavaScript / Functions / String() / Function to convert number to string

#JavaScript #JavaScript / Functions / String() / Function to convert number to string String() String() is a function that converts a number to a string. Grammar String( object ) object : Enter a number or a variable whose value is a number. example The value of variable c is 3, which is the addition of number 1 and number 2. The value of variable d is 12, which is character 1 plus character 2. ..

Javascript 2022.08.10
728x90
LIST