DOM Manipulations
The goal of this coding exam is to quickly get you off the ground with the DOM Manipulations.
Use the below reference image.
<!DOCTYPE html>
<html>
<head>
<title>Hello html</title>
</head>
<body>
<p id="text_change"></p>
<button onclick="AddText()">Add text</button>
<button onclick="RemoveText()">Romove text</button>
</body>
<script>
function AddText(){
let Text = document.getElementById('text_change');
Text.innerHTML = "Hello js";
}
function RemoveText(){
let Text = document.getElementById('text_change');
Text.innerHTML = " ";
}
</script>
</html>
Comments
Leave a comment