html
html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<!-- Thanks to Bob_Li for fixing the code-->
<!DOCTYPE html>
<html>
<head>
<title>Message For Yourself</title>
</head>
<body>
<table id="list">
</table>
<input type="text" id="text">
<button onclick="submit()">/\</button>
</body>
</html>
Enter to Rename, Shift+Enter to Preview
css
css
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
* {
box-sizing:border-box;
}
input {
position:fixed;
border-radius:12px;
height:24px;
margin:4px 4px 4px 4px;
padding:3px 5px 3px 5px;
bottom:0px;
border: 2px solid white;
}
button{
position:fixed;
border-radius:50%;
background-color:rgb(128, 255, 128);
color:white;
font-weight:900;
height:48px;
width:48px;
margin:4px 4px 4px 4px;
padding:3px 5px 3px 5px;
bottom:0px;
border:2px solid white;
right:0px;
}
Enter to Rename, Shift+Enter to Preview
js
js
1
2
3
4
5
6
7
8
9
10
11
function submit() {
let text = document.getElementById("text").value;
if (text) {
let table = document.getElementById("list");
let row = table.insertRow(-1);
let cell1 = row.insertCell(0);
cell1.innerHTML = text;
document.getElementById("text").value = "";
}
}
Enter to Rename, Shift+Enter to Preview
BROWSER
Console
Run