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

Lucas Bryce
Lucas Bryce
Pro Student 4,510 Points

What am I doing wrong?

help pls

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

1 Answer

<noob />
<noob />
16,621 Points

Your’e very close. right now you are selecting the input element but in order to select the content inside the input element u need to add the keyword “value”. so it’s document.getElementById(“linkname”).value;