如何在 cookie 中存储 table 的值

how to store the values of the table in cookies

https://github.com/palani-08/travelblog/blob/main/html/table.html/table%20submission_files/index.html [我已附加此文件,我无法在 cookie 中获取 table 的值]

localStorage.myTable = document.querySelector('#myTab').innerHTML.trim() // 存储

document.querySelector('#myTab').innerHTML = localStorage.table // 恢复