Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <title>Grok Eats</title>
- </head>
- <body>
- <h1>Grok Eats</h1>
- <p>
- <label id="amountLabel">
- <!-- Put the number input here -->
- <input id="amountInput" type="number">
- × Pad Thai
- </label>
- <label id="proteinLabel">
- with
- <!-- Put the select here -->
- <select id="proteinSelect">
- <option value="Chicken">Chicken</option>
- <option value="Beef">Beef</option>
- <option value="Tofu">Tofu</option>
- <option value="Vegetable">Vegetable</option>
- </select>
- </label>
- </p>
- <p>
- <span id="amount">0</span> Pad Thai with <span id="protein">Chicken</span>
- </p>
- <script>
- // Your JavaScript here
- function amount2() {
- amount.textContent = amountInput.value
- }
- amountInput.oninput = amount2;
- function protein2() {
- protein.textContent = proteinSelect.value
- }
- proteinSelect.oninput = protein2;
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement