html
html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
<script>
function mny(){
var money =prompt("How much money do you have");
if ((money >= 3) && (money < 8)) {
document.write("thanks for buying, you have $"+money+" to buy blender <img src='https://i.ibb.co/nn2KYMM/dac3b362-0095-4e66-a457-72ded8a04a41-1-c591d2b4dd6c348e5af5fb300beb5440.jpg'> $3.⁰⁰ <br>here is your change $"+((money-3).toFixed(2))+" back");}
else if ((money >= 8)&&(money <=10)){ document.write("thanks for buying the convention oven <img src='https://i.ibb.co/DML9vH7/569-fc331.png' style='height:25%;width:65%;'> $8.⁰⁰ <br>for $"+money + " here is your change $"+((money-8).toFixed(2)));}
else if (money >= 11){ document.write("thanks for buying both convention oven <img src='https://i.ibb.co/DML9vH7/569-fc331.png' style='height:25%;width:65%;'> $8.⁰⁰ <br>and blender<img src='https://i.ibb.co/nn2KYMM/dac3b362-0095-4e66-a457-72ded8a04a41-1-c591d2b4dd6c348e5af5fb300beb5440.jpg'> $3.⁰⁰ <br>for $"+11+" here is your change $"+ ((money-11).toFixed(2)));}
else { document.write("not enough money please come back later");}
if ((money-11).toFixed(2) >= 2){ var chg = (money-11).toFixed(2);
var fc = (chg - 2).toFixed(2)
document.write("<br>Here is a toaster too <img src='https://i.ibb.co/sJ0nmN6/TR3500-SD-Hero.jpg'> normally <s>$4.⁷⁵</s> but because you are a valued customer $2.⁰⁰ today<br>Thanks for shopping <br>$"+fc+" is your change");}}
</script>
</head>
<body>
<button onclick="mny()"><img src="https://i.ibb.co/nn2KYMM/dac3b362-0095-4e66-a457-72ded8a04a41-1-c591d2b4dd6c348e5af5fb300beb5440.jpg" alt="dac3b362-0095-4e66-a457-72ded8a04a41-1-c591d2b4dd6c348e5af5fb300beb5440" border="0"></button>
<b>blender $3.⁰⁰</b><br>
Enter to Rename, Shift+Enter to Preview
css
css
1
2
img { height:45%;width:20%;}
button { width:345px;}
Enter to Rename, Shift+Enter to Preview
js
js
1
Enter to Rename, Shift+Enter to Preview
BROWSER
Console
Run