본문 바로가기
728x90
반응형
SMALL

전체 글375

chapter 7) Manipulating ### Handling Text Content vs. Inner HTML - **`textContent` vs. `innerHTML`**: Two `` elements are targeted. For the first (`#a`), `textContent` is used to set text that appears as plain text, including the `` tags, demonstrating that `textContent` does not parse HTML. For the second (`#b`), `innerHTML` is used, which interprets the `` tags and renders them as HTML, showing the difference in hand.. 2024. 12. 17.
chapter 7) select tag a b c d select : a ### Key Components and Functionality - **`` Element**: Contains four `` elements (labeled 'a', 'b', 'c', and 'd'). Users can select one of these options from the dropdown menu. - **`` Element**: Initially displays "select : a". This text will be updated to reflect the currently selected option in the `` dropdown menu. - **JavaScript Logic**: - The script first selects the `` a.. 2024. 12. 16.
chapter 6) Add object properties dynamically ### Adding Properties to an Object - **Initialization**: An empty object `student` is created. - **Adding Properties**: Properties `name`, `hobby`, and `future` are added to the `student` object with respective values `'insung'`, `'playing'`, and `'bio-logical engineer'`. - **Logging**: `JSON.stringify(student, null, 2)` is used to convert the `student` object into a JSON string with formatting .. 2024. 12. 15.
chapter 6) Array_Copy ### Shallow Copy of Arrays - **Direct Assignment (`a_200301` and `a_200302`)**: The array `a_200302` is assigned the same reference as `a_200301`, meaning any changes made to `a_200302` reflect in `a_200301` because they refer to the same array in memory. - After pushing "sweet potato" and "tomato" to `a_200302`, both `a_200301` and `a_200302` show these additions, demonstrating that they are in.. 2024. 12. 14.
728x90
반응형
LIST