• Register
Forum Thread
Javascript Question (Forums : Development Banter : Javascript Question) Post Reply
Thread Options
Aug 13 2019 Anchor

I'm taking a course for JS soon and they require that I finish a pre-course packet. The last thing is JS, and they literally talk about how they haven't taught us anything on it yet- want us to do a bunch of stuff that I honestly feel is way past my ability to comprehend (they express that we are suppose to use any resource to teach ourselves). I was extremely angry yesterday and frustrated and now I'm at the point where I'm so upset I'm debating to drop everything.

Simply put- here is an HTML file, do NOT edit it. Create a JS file, and through that .js file you have to add more buttons to the page, change their opacity and color.

I have NO idea how to do this and everything I find (w3school.com) keeps telling me to edit the HTML file with <script> tags INSIDE the HTML file and not inside the JS file. I'm hoping someone on here can help me with the basics on how to do this. I've learned console commands (alerts and such) but nothing relating to editing an HTML file through a JS file... let alone explain the language in a manner I can understand. Thanks in advance for any help. Here's the HTML file...

<!DOCTYPE html><html><head>
<title>Jiggle Into JavaScript</title> <!-- [removed][removed] -->
<p>Press the buttons to change the box!</p>
<div id="box" style="height:150px; width:150px; background-color:orange; margin:25px"></div>
<button id="button1">Grow</button>
<button id="button2">Blue</button>
<button id="button3">Fade</button>
<button id="button4">Reset</button>
<script type="text/javascript" src="javascript.js"></script>
Reply to thread
click to sign in and post

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.