Skip to content
Open
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
48 changes: 47 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<head>
<link rel="stylesheet" href="./index.css">
<title>Combining HTML and JavaScript + DOM Lab</title>
<script src="problems.js" defer></script>
</head>
<body>
<h1 id = "top_heading">Combining HTML and JavaScript + DOM Lab</h1>
Expand All @@ -16,34 +17,79 @@ <h2>1. String Mirror</h2>

<input id="mirror-input" type="text" placeholder="Enter your string here">
<p id="mirror-output">Waiting for input...</p>
<button id="mirror-button" type="submit">Submit</button>
<button id="mirror-button" type="submit" onclick="stringMirror()">Submit</button>



<h2>2. String Uppercaser</h2>

<input id="uppercaser-input" type="text" placeholder="Enter text here">

<p id="uppercaser-output">Text here..</p>

<button id="uppercaser-button" type="submit" onclick="stringToUpper()">Submit</button>

<li>Make a text input with id='uppercaser-input'</li>
<li>They should then be able to click a "submit" button with id='uppercaser-button' that will display the string the user entered in all uppercase in an element with id='uppercaser-output'</li>

<h2>3. Palindrome Detector</h2>

<input id=palindrome-input type="text" placeholder="Enter text here">

<p id="palindrome-output">It is ${true/false} that ${entered string} is a palindrome</p>

<button id="palindrome-button" type="submit" onclick="palindromeDec()">Submit</button>

<li>The user should be able to enter a string into a text input with id='palindrome-input'</li>
<li>They should then be able to click a "submit" button with id='palindrome-button'. Clicking the button will display a string in the form "It is ${true/false} that ${entered string} is a palindrome" with id='palindrome-output'</li>

<h2>4. Even Checker</h2>

<input id="even-checker-input" type="text" placeholder="Enter number">

<p id="even-checker-output">Text here</p>

<button id="even-checker-button" type="submit" onclick="evenCheck()">Submit</button>

<li>The user should be able to enter a number into an input with id='even-checker-input'</li>
<li>They should then be able to click a "submit" button with id='even-checker-button' that will display a string in the form "It is ${true/false} that ${entered number} is even" with id='even-checker-output'</li>

<h2>5. Number Doubler</h2>

<input id="doubler-input" type="number" placeholder="Enter number here">

<p id="doubler-output">Number here..</p>

<button id="doubler-buttom" type="submit" onclick="doublefunk()">Submit</button>

<li>The user should be able to enter a number into an input with id='doubler-input'</li>
<li>They should then be able to click a "submit" button with id='doubler-button' that will display a string in the form "${entered number} doubled is ${doubledVal}" with id='doubler-output'</li>

<h2>6. Average of Three Numbers</h2>

<input id="average-input-1" type="number" placeholder="Enter number">

<input id="average-input-2" type="number" placeholder="Enter number">

<input id="average-input-3" type="number" placeholder="Enter number">

<p id="average-output">Average here...</p>

<button id="average-button" type="submit" onclick="averager()"></button>


<li>The user should be able to enter 3 numbers into text inputs with ids 'average-input-1', 'average-input-2', and 'average-input-3'</li>
<li>They should then be able to click a "submit" button with id='average-button' that will display a string in the form "The average of ${numberOne}, ${numberTwo}, and ${numberThree} is ${average}" with id='average-output'</li>

<h2>Bonus: Vowel Remover</h2>

<input id="vowel-remover-input" type="text" placeholder="Enter text here">

<input id="y-is-vowel-checkbox" type="checkbox">

<p id="vowel-remover-output">Text here..</p>

<button id="vowel-remover-button" type="submit" onclick="bonus()">Submit</button>

<li>The user should be able to enter a string into a text input with id='vowel-remover-input'</li>
<li>The user should be able to select or deselect a checkbox with id='y-is-vowel-checkbox'</li>
Expand Down
Loading