Need Help!!! Having trouble getting my scripts to run and my for statements to execute(I know the variables inside are messed up, don't think I need help with that.
<!DOCTYPE html>
<html lang="en">
<head>
<title>CIS 223 Chapter 9 Program</title>
<style>
body{
background-image:url('file:///C:/Users/wizar/Desktop/Chapter_10/rainforest.jpg');
background-repeat:no-repeat;
background-attachment:fixed;
background-size:100% 100%;
color: white;
}
</style>
<script>
var replace;
function swap()
{
var replace = prompt ("Choose Item number 1, 2 or 3 to replace that item");
for (var replace == 1 ){
var replaceitem1 = prompt ("Write what i should replace for the first item");
break;
}
console.log(repalceitem1)
var object2 = Sleeping Bag;
var object3 = Camping Equipment;
for (var replace == 2 ){
var replaceitem2 = prompt ("Write what i should replace for the Second item");
break;
}
console.log(repalceitem2)
var object1 = Tent;
var object3 = Camping Equipment;
for (var replace == 3 ){
var replaceitem3 = prompt ("Write what i should replace for the Third item");
break;
}
console.log(repalceitem3)
var object1 = Tent;
var object2 = Sleeping Bag'
}
</script>
</head>
<body onload="mylist()">
<script>
function mylist()
{
var item1 = Tent;
var item2 = Sleeping Bag;
var item3 = Camping Equipment;
document.getElementById("object1").innerHTML = item1;
document.getElementById("object2").innerHTML = item2;
document.getElementById("object3").innerHTML = item3;
}
</script>
<h1>The destination that was chosen was The Amazon Rainforest!!!</h1>
<br><br>
<h3>I choose the Amazon Rainforest as the destination to set out the start of my wilderness adventure</h3>
<br>
<br>
<h3>These are the tools i am considering brining on my trip to the rainforest, and need some advice on if i should swap
something out or not.</h3>
<br>
<h3>Here is a list of the three items, press the button below the list to select the numbered item to swap out with a item of your choosing!</h3>
<br>
<br>
<ol>
<li><span id="object1"></span></li>
<li><span id="object2"></span></li>
<li><span id="object3"></span></li>
<p><input type ="button" onclick = "swap()" value="Swap Resource"/></P>
</body>
</html>