JavaScript JavaScript and the DOM Making Changes to the DOM Modifying Elements

Alexandru Pescaru
Alexandru Pescaru
5,223 Points

cand anyone help me please i don't understand the question in the task.

cand anyone help me please i don't understand the question in the task.

app.js
var inputValue = document.querySelectorAll('#linkName');
index.html
<!DOCTYPE html>
<html>
    <head>
        <title>DOM Manipulation</title>
    </head>
    <link rel="stylesheet" href="style.css" />
    <body>
        <div id="content">
            <label>Link Name:</label>
            <input type="text" id="linkName">
            <a id="link" href="https://teamtreehouse.com"></a>
        </div>
        <script src="app.js"></script>
    </body>
</html>

1 Answer

Steven Parker
Steven Parker
203,731 Points

There's a couple of issues here:

  • only one element is needed here, but the method being used selects a collection of elements
  • the instructions ask for the contents of the "value" attribute, not the element itself