Internet
Up to 1 Gbps download
TV
140+ channels
Homelife
Not included
Phone
14+ features
$208.99/mo
for 12 mos. w/ 1-yr. term
agrmt.
<html lang="en"><head>
<meta charset="UTF-8">
<title>Textarea with Button</title>
<style>
.text-input {
width: 200px;
height: 24px;
border: 2px solid black; /* Border around the text boxes */
display: block; /* New line for each text input */
margin-top: 5px; /* Space between inputs */
}
textarea {
font-size: 10px;
font-family: Arial, sans-serif;
width: 720px; /* Adjusted to not exceed 720px */
height: 220px;
padding: 4px;
margin-top: 2px;
margin-bottom: 3px;
border: 2px solid #ccc;
border-radius: 2px;
resize: both;
max-width: 600px; /* Maximum width constraint */
overflow: auto;
}
</style>
<script>
function insertDateTimeAndRows() {
var container = document.getElementById('container');
var currentDate = new Date().toISOString();
// Clear previous content
container.innerHTML = '';
// Create and append the timestamp
var timestampDiv = document.createElement('div');
timestampDiv.textContent = currentDate;
container.appendChild(timestampDiv);
// Create and append three text inputs
for (let i = 0; i < 3; i++) {
var input = document.createElement('input');
input.type = 'text';
input.className = 'text-input';
container.appendChild(input);
}
var textarea = document.getElementById('textarea1');
var newContent = currentDate + " \n\n\n\n\n\n\n\n" + textarea.value;
textarea.value = newContent;
var cursorPosition = currentDate.length + 2;
textarea.setSelectionRange(cursorPosition, cursorPosition);
textarea.focus();
}
function openFrameless(url, left = 0, top = 0, width = 400, height = 240) {
var features = 'toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,' +
`width=${width},height=${height},left=${left},top=${top},alwaysOnTop=yes`;
window.open(url, '_blank', features);
}
function saveContent() {
const textareas = document.getElementsByTagName("textarea");
for (let i = 0; i < textareas.length; i++) {
localStorage.setItem(textareas[i].id, textareas[i].value);
}
}
function loadContent() {
const textareas = document.getElementsByTagName("textarea");
for (let i = 0; i < textareas.length; i++) {
const savedContent = localStorage.getItem(textareas[i].id);
if (savedContent) textareas[i].value = savedContent;
}
}
document.addEventListener('DOMContentLoaded', (event) => {
loadContent();
document.querySelectorAll("textarea").forEach((element) => {
element.addEventListener("input", saveContent);
});
});
</script>
</head>
<body>
<!textarea id="textarea1" rows="10" cols="50"></textarea>
<button onclick="insertDateTimeAndRows()">Insert DateTime and Rows</button>
<div id="container"><div>2024-03-20T17:15:44.201Z</div><input type="text" class="text-input"><input type="text" class="text-input"><input type="text" class="text-input"></div>
</body></html>