CpSc 130 Notes Javascript and User Interaction
Total: <input type="text" id="total" name="total" value="0" >
document.getElementById("total").value = "$" + total;
x myVar lastName z hello5 donut numCakes taxRate
5nums 3x5 x-z getElementById st.67 m&m isNaN 56redBalls
var userInput; var myNumber; userInput = document.getElementById('someTextBox'); myNumber = parseInt(userInput); myNumber = myNumber + 3;Enter a value and then
var TAXRATE = 0.0925; var DONUTPRICE = 0.50;
if (isNaN(numCakeDonuts)) numCakeDonuts = 0;
+ addition - subtraction * multiplication / division ( ) to get the correct order of operations