-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
70965d0
commit 4322b16
Showing
1 changed file
with
1 addition
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,107 +1 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Edit Table Values</title> | ||
</head> | ||
<body> | ||
|
||
<table id="editableTable" border="1"> | ||
<thead> | ||
<tr> | ||
<th>Column 1</th> | ||
<th>Column 2</th> | ||
<th>Column 3</th> | ||
<th>Column 4</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr> | ||
<td contenteditable="true">Row 1, Column 1</td> | ||
<td contenteditable="true">Row 1, Column 2</td> | ||
<td contenteditable="true">Row 1, Column 3</td> | ||
<td contenteditable="true">Row 1, Column 4</td> | ||
</tr> | ||
<tr> | ||
<td contenteditable="true">Row 2, Column 1</td> | ||
<td contenteditable="true">Row 2, Column 2</td> | ||
<td contenteditable="true">Row 2, Column 3</td> | ||
<td contenteditable="true">Row 2, Column 4</td> | ||
</tr> | ||
<tr> | ||
<td contenteditable="true">Row 3, Column 1</td> | ||
<td contenteditable="true">Row 3, Column 2</td> | ||
<td contenteditable="true">Row 3, Column 3</td> | ||
<td contenteditable="true">Row 3, Column 4</td> | ||
</tr> | ||
<tr> | ||
<td contenteditable="true">Row 4, Column 1</td> | ||
<td contenteditable="true">Row 4, Column 2</td> | ||
<td contenteditable="true">Row 4, Column 3</td> | ||
<td contenteditable="true">Row 4, Column 4</td> | ||
</tr> | ||
<tr> | ||
<td contenteditable="true">Row 5, Column 1</td> | ||
<td contenteditable="true">Row 5, Column 2</td> | ||
<td contenteditable="true">Row 5, Column 3</td> | ||
<td contenteditable="true">Row 5, Column 4</td> | ||
</tr> | ||
<tr> | ||
<td contenteditable="true">Row 6, Column 1</td> | ||
<td contenteditable="true">Row 6, Column 2</td> | ||
<td contenteditable="true">Row 6, Column 3</td> | ||
<td contenteditable="true">Row 6, Column 4</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
|
||
<script> | ||
document.addEventListener('DOMContentLoaded', function () { | ||
var table = document.getElementById('editableTable'); | ||
|
||
table.addEventListener('input', function (e) { | ||
// Save changes to localStorage (temporary storage) | ||
saveTableData(); | ||
}); | ||
|
||
// Load saved data from localStorage | ||
loadTableData(); | ||
}); | ||
|
||
function saveTableData() { | ||
var table = document.getElementById('editableTable'); | ||
var tableData = []; | ||
|
||
// Loop through rows and cells to get the content | ||
for (var i = 0; i < table.rows.length; i++) { | ||
var rowData = []; | ||
for (var j = 0; j < table.rows[i].cells.length; j++) { | ||
rowData.push(table.rows[i].cells[j].innerText); | ||
} | ||
tableData.push(rowData); | ||
} | ||
|
||
// Save the data to localStorage | ||
localStorage.setItem('tableData', JSON.stringify(tableData)); | ||
} | ||
|
||
function loadTableData() { | ||
var table = document.getElementById('editableTable'); | ||
var tableData = localStorage.getItem('tableData'); | ||
|
||
if (tableData) { | ||
tableData = JSON.parse(tableData); | ||
|
||
// Loop through rows and cells to set the content | ||
for (var i = 0; i < tableData.length; i++) { | ||
for (var j = 0; j < tableData[i].length; j++) { | ||
table.rows[i].cells[j].innerText = tableData[i][j]; | ||
} | ||
} | ||
} | ||
} | ||
</script> | ||
|
||
</body> | ||
</html> | ||
<iframe src="https://calendar.google.com/calendar/embed?height=600&wkst=1&bgcolor=%23ffffff&ctz=Asia%2FKolkata&src=NzRmN2EzOWZiODRlMDg4NTExN2FkN2IwMTkyZjk2MGU1NTYyNDlhYWIwNzE5MmZlZjYzZjFhNGZjM2RlMGNiN0Bncm91cC5jYWxlbmRhci5nb29nbGUuY29t&color=%23F6BF26" style="border:solid 1px #777" width="800" height="600" frameborder="0" scrolling="no"></iframe> |