right now on my page you can select add to basket and it will add them up in the total. I am trying to change it so you can select between 1 and 3 and it will add them together in the total but im unsure h=of how to change my page so it will do this?
Current Script:
<script>
var w = 0
var x = 19.99
var y = 24.99
function total1()
{
w = w + x
document.getElementById('Total').value= w;
}
function total2()
{
w = w + y
document.getElementById('Total').value= w;
}
</script>
Table to select options and display them:
<table id="t2">
<tr>
<td>
<img src="item1.png" alt="Sunset Boulevard T-Shirt Men" style="width:350x;height:250px">
</td>
<td>
<img src="item2.png" alt="Sunset Boulevard T-Shirt Woman" style="width:350x;height:250px">
</td>
</tr>
<tr>
<td>
<p id="price">£19.99</p>
</td>
<td>
<p id="price">£24.99</p>
</td>
</tr>
<tr>
<td>
<input type="button" value= "Add To Basket" onclick ="total1()">
</td>
<td>
<input type="button" value= "Add To Basket" onclick ="total2()">
</td>
</tr>
</table>
<br>
<h3 id="header3"></h3>
<div id="all">
Basket: <input type="text" id="Total" disabled="disabled">
</div>