国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

如何保存在contenteditable div中輸入的文本,以便在重新載入HTML時(shí)重新顯示?
P粉156415696
P粉156415696 2024-03-22 08:48:06
0
1
535

我不知道如何在設(shè)定了 'ContentEditable="true"' 的 div 中儲(chǔ)存一些文字?

基本上,我對(duì) ??HTML 和 CSS 編碼非常天真,而 JS 遠(yuǎn)遠(yuǎn)超出了我的能力範(fàn)圍。不過,我已經(jīng)成功地使用 HTML 和 CSS 為自己製作了某種日程安排表。

問題是,我不知道如何使放入 HTML 中的 div 中的文字(將 contenteditable 設(shè)為 true)保留下來,並在下次在瀏覽器上開啟 html 檔案時(shí)顯示。

我將只在本地主機(jī)中使用我的應(yīng)用程序,並且不想使用任何類型的資料庫。

期待你們的專業(yè)知識(shí)和友善的幫助。 所需資訊如下--

.quote
{
    width: 92%;
    height: 48vh;
    margin: 2% auto auto auto;
    background-color: beige;
    border-style: solid;
    border-width: 12px;
    border-color: aqua;
    display: grid;
    grid-template-rows: 12% auto;
}

.quote .p
{
    height: 100%;
    margin:0 auto auto 12px;
    font-family: 'Montserrat', sans-serif;
    font-size: 12vh;
    background-image: linear-gradient(180deg, rgba(26,18,189,1) 51%, rgba(43,181,131,1) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.quote .p p
{
    height: 100%;
    width: 100%;
    margin:0;
}

.quote .writetext
{
    min-height: 8vmax;
    max-height: 19vmax;
    width: 25.6vmax;
    margin: 12px auto 12px auto;
    border-style: solid;
    border-width: 2px;
    border-color: white;

    font-family: 'Patrick Hand', cursive;
    font-size: 4vh;
    text-align: center;
}
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>DayMaker- Welcome</title>
    <link rel="stylesheet" href="styles.css">
    <script src="scripts.js"></script>

    <link rel="preconnect" >
    <link rel="preconnect"  crossorigin>
    <link  rel="stylesheet">
    <link  rel="stylesheet">
</head>
<body>
     <div class="quote">
          <div class="p"><p>"</p></div>
          <div class="writetext" contenteditable="true">
          </div>
     </div>
</body>
</html>

注意:給定的程式碼片段是一個(gè)更大專案的一部分。因此,請(qǐng)忽略圖形差異。

這是我正在從事的專案的圖片:-我們需要修復(fù)右下角的那個(gè)框

我嘗試在網(wǎng)路上搜尋很多解決方案,但找不到任何解決方案。 真誠期待您的幫忙。

P粉156415696
P粉156415696

全部回覆(1)
P粉166779363

你需要一個(gè)資料庫,我知道沒有資料庫就沒有辦法做到這一點(diǎn),如果你在 SQL 方面遇到問題,你可以使用 Excel,否則除了使用資料庫之外我沒有解決方案

最新下載
更多>
網(wǎng)站特效
網(wǎng)站源碼
網(wǎng)站素材
前端模板