Run Code
|
Code Wall
|
Users
|
Misc
|
Feedback
|
About
|
Login
|
Theme
|
Privacy
Task selector
<!DOCTYPE html> <html> <head> <title>To-do list randomizer</title> <meta charset="UTF-8"/> <style> #get { font-size: 20px; resize: none; } .vi { font-size: 20px; font-family: arial; background-color: white; } </style> <script> var list = new Array() function put() { var txt = document.getElementById("get").value if (txt != "") { document.getElementById("task").innerHTML = "" document.getElementById("Tlist").innerHTML += "<li>" + txt + "</li>" list.push(txt) document.getElementById("get").value = "" } } function select() { if (list.length > 1) { document.getElementById("task").innerHTML = "Selected task: " + list[Math.floor(Math.random() * list.length)] document.getElementById("Tlist").innerHTML = "" document.getElementById("get").value = "" list.splice(0, list.length) } } </script> </head> <body> <input id="get" maxlength="200" placeholder="Eat some burrito"> <button style="font-size: 20px;" type="button" onclick="put()">Put in to do list</button> <button style="font-size: 20px;" type="button" onclick="select()">Select task</button><br/> <ul class="vi" id="Tlist"> </ul> <span id="task" class="vi"></span> </body> </html>
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
90's emoji cursor
Regex Generator For Annish
SY Loader
nice floppy disk animation
Half
Regex Generator For Annish
Basic player movement
Basic player movement
nice floppy disk animation
3d cube (NOT MADE BY ME!!!!!)
Please log in to post a comment.