Skip to content

Instantly share code, notes, and snippets.

@keithjng
Created February 25, 2020 00:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save keithjng/12d473ea57321ad4a9ecdfeaebce52a2 to your computer and use it in GitHub Desktop.
Save keithjng/12d473ea57321ad4a9ecdfeaebce52a2 to your computer and use it in GitHub Desktop.
todos
section {
background-color: lemonchiffon;
margin: -10px 400px 0 400px;
}
h1 {
text-align: center;
font-size: 75px;
border-bottom: red solid;
}
.list {
text-align: center;
}
button {
background: teal;
color: white;
}
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="./main.css">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>TODO List</title>
</head>
<body>
<section>
<head> <h1>My To Do List</h1></head>
<div class="list">
<object width=300px height=300px type="text/plain" data="todos.txt">
</object>
<form class = 'addToList'>
<input type="text" placeholder="add to list" class ="addItem">
<button type="submit" class="addButton">ADD</button>
</form>
</div>
</section>
</body>
<script src="./todo.js"></script>
</html>
function WriteToFile(passForm) {
let fso = CreateObject("Scripting.FileSystemObject");
let s = fso.CreateTextFile("./todos.txt", True);
var add = $('add');
s.writeline('[ ] ' + add);
s.Close();
}
WriteToFile('./todo.txt');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment