Content Page 1- Stocks Overview: This page will contain a table. This table will
ID: 3664050 • Letter: C
Question
Content Page 1- Stocks Overview: This page will contain a table. This table will list 4 stocks with made up stock prices per share. It will contain a buy button and sell button for each stock. It will also contain a field for each stock where a user can enter a number of shares (to sell or to buy). The site will accept the purchase if the user has enough money in their account and it will refuse it if otherwise. It will accept sales of stocks if the user has enough shares to sale. (You can't sell shares you haven't purchased). When a sale is accepted, the site will display a success message and the corresponding amount of funds will be removed from the account and the shares added to the user's account. The site will not actually interact with a real stock exchange. Write HTML, CSS and javascript code for above one.
Explanation / Answer
<html>
<head>
<title>Shares</title>
</head>
<body>
<table border="1">
<tr>
<th>Shares</th>
<th>Cost / Share</th>
<th>Action</th>
</tr>
<tr>
<td>A</td>
<td>$2.00</td>
<td><button>Buy</button><button>Sell</button></td>
</tr>
<tr>
<td>B</td>
<td>$6.00</td>
<td><button>Buy</button><button>Sell</button></td>
</tr>
<tr>
<td>C</td>
<td>$1.58</td>
<td><button>Buy</button><button>Sell</button></td>
</tr>
<tr>
<td>D</td>
<td>$2.36</td>
<td><button>Buy</button><button>Sell</button></td>
</tr>
</table>
</body>
</html>
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.