<!DOCTYPE html>
<html>
<body>
<h2>List Totals</h2>
<p>Display myList Total:</p>
<p id="total"></p>
<form action="/action_page.php">
<select id = "myList">
<option>0</option>
<option>1</option>
<option>2</option>
<option>3</option>
</select>
<p></p>
<form action="/action_page.php">
<select id = "myList2">
<option>0</option>
<option>1</option>
<option>2</option>
<option>3</option>
</select>
</form>
<script>
var x = document.getElementById("myList"+"myList2");
document.getElementById("total").innerHTML = x;
</script>
</body>
</html>
Sorry, this is my first attempt at making a HTML/JS form by using two drop-down menus and adding the values for a total. It seems to not let me have a total. What am I doing wrong? Thanks you all!