Javascript - Change element CSS by ID using onclick event

preview_player
Показать описание
A simple video showing how to change the CSS of an element by assigning it an ID and using the click of a button.

In this example we will be changing the font size of a p tag, it will be changing from a smaller text to a larger text once the button is clicked.

Comment below if you have any other questions and I'll be more than happy to help you out. Also comment below for any future videos you would like to see!

SUBSCRIBE!
Рекомендации по теме
Комментарии
Автор

Exactly what I was looking for, thank you!

thiroshapillay
Автор

do you happen to know how i can change more than one attribute about an element with a single click?
example: changing a box's color and size at the same time

i assume its pretty simple but I can't find the correct syntax that gets it to work.

StrengthScholar