Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions MessageChanger/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<html>
<head>
<title></title>
</head>

<body>
<div class="output"></div>
<input type="text" value="Your Name Here">
<button type="button">Change Message</button>

<script src="messageChanger.js"></script>

</body>
</html>
10 changes: 10 additions & 0 deletions MessageChanger/messageChanger.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
const output = document.querySelector(".output");
const button = document.querySelector("button");

let theName = document.querySelector("input");

console.log(button);
button.addEventListener("click",showMessage);
function showMessage(){
output.innerHTML = `<p>Hello, ${theName.value}.</p>`;
}
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,13 @@ If there's anything that you think could be improved due to misunderstanding, th

# The 1000 Things
Structure of the repo Things are as *folder > main js file*, along with the supporting HTML and CSS files.

5. Message Changer > messageChanger.js
4. Time of Day > timeOfDay.js
3. VAT Calculator > vat-script.js
2. Date and Time > myYearAndDate.js
1. Date and Time > myDayFunction.js


# Courses and Sources
**[https://www.sololearn.com/Course/JavaScript/](https://www.sololearn.com/Course/JavaScript/)**
Pretty good intro, some content has been reworked in a confusing manner, so feel free to cheat and read the comments for the answers.