Bummer! This is just a preview. You need to be signed in with an account to view the entire instruction.
Well done!
You have completed (UPI) Chapter 9: Understanding the Document Object Model (DOM) with JavaScript!
Instruction
Changing Element Styles
As you have seen in previous chapters, the attributes of an element can be modified by JavaScript. Two attributes, the class and style, influence the visual representation of an element. They contain CSS code.
<!DOCTYPE html>
<html>
<head>
<script>
function toggle() {
"use strict";
// ...
}
</script>
<style>
.divClassGreen {
backgroun...