Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
saving progress
  • Loading branch information
bpd01001 committed Jan 27, 2020
1 parent 7ba05a8 commit 0a4373f
Showing 1 changed file with 52 additions and 0 deletions.
52 changes: 52 additions & 0 deletions week-2/index.html
@@ -0,0 +1,52 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>My Shopping List App</title>
<style>
#item {
border: 1px solid #ccc;
font-size: 16px;
}
ul, li {
margin: 0;
padding: 0;
list-style-type: none;
}
li{
padding: .5em 0;
}
</style>
</head>
<body>
<h1>My Shopping List App</h1>

<input type="text" name="item" id="item"> <button id="add">Add</button>

<hr>

<ul>
<li>
<input type="checkbox" name="items">
Milk
<a href="">x</a>
</li>
<li>
<input type="checkbox" name="items">
Cookies
<a href="">x</a>
</li>
</ul>
<script>
const addBtn = document.getElementById('add');
const inputBox = document.getElementById('item');


addBtn.addEventListener('click', function(){
console.log('button clicked', inputBox.value);
});
</script>
</body>
</html>

0 comments on commit 0a4373f

Please sign in to comment.