国产 无码 综合区,色欲AV无码国产永久播放,无码天堂亚洲国产AV,国产日韩欧美女同一区二区

第24次修改了可刪除可持久保存的前端html備忘錄:文本編輯框不再隱藏,又增加了嗶哩嗶哩搜索和必應(yīng)搜索

這篇具有很好參考價(jià)值的文章主要介紹了第24次修改了可刪除可持久保存的前端html備忘錄:文本編輯框不再隱藏,又增加了嗶哩嗶哩搜索和必應(yīng)搜索。希望對(duì)大家有所幫助。如果存在錯(cuò)誤或未考慮完全的地方,請(qǐng)大家不吝賜教,您也可以點(diǎn)擊"舉報(bào)違法"按鈕提交疑問。

第24次修改了可刪除可持久保存的前端html備忘錄:文本編輯框不再隱藏,又增加了嗶哩嗶哩搜索和必應(yīng)搜索,css,javascript,html

第24次修改了可刪除可持久保存的前端html備忘錄:文本編輯框不再隱藏,又增加了嗶哩嗶哩搜索和必應(yīng)搜索.文章來(lái)源地址http://www.zghlxwxcb.cn/news/detail-848826.html

<!DOCTYPE html>
<html lang="zh">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>與妖為鄰備忘錄</title>
</head>
<style>
  /* ******制定統(tǒng)一規(guī)則 開始 */
  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    list-style: none;
    user-select: none;
    color: #fffbfb;
    text-shadow: 1px 1px 1px #000;
  }
 input,
  button {
    cursor: pointer;
    border-radius: 5px;
    font-size: 18px;
    border: 1px solid rgb(134, 133, 133);
    color: rgb(252, 223, 4);
    background-color: #ff02029c;
  }
 /* ******制定統(tǒng)一規(guī)則 結(jié)束 */
  /* **頁(yè)面背景樣式:.body_background 開始*/
  body {
    min-height: 100vh;
    /* background: radial-gradient(at 60% 0%, #3a6073, #1c2522); */
    /* background: linear-gradient(to bottom, #022c05, #000000);  */
    background: #3a6073;
    /* background:  #303745; */
    /* background:  #1c2522; */
    background-size: cover;
    animation: bodybackground 16s infinite;
  }
 /* **頁(yè)面背景樣式:.body_background*****結(jié)束 */
  /* 頭部標(biāo)題.header_title 開始 */
  .header_title {
    position: fixed;
    top: 2px;
    left: 2px;
    width: 140px;
    height: 66px;
    border-radius: 50%;
    color: rgb(255, 255, 255);
   /* 圖片 img*/
    img {
      float: left;
      width: 66px;
      height: 66px;
      border-radius: 50%;
      transition: transform 0.3s ease;
     &:hover {
        transform: scale(1.1);
      }
    }
   h2 {
      background-color: #f30303;
      border-radius: 50%;
      background-image: linear-gradient(to top left,
          rgba(0, 0, 0, 0.2),
          rgba(0, 0, 0, 0.2) 30%,
          rgba(0, 0, 0, 0));
      box-shadow: inset 4px 4px 4px rgba(255, 255, 255, 0.6),
        inset -4px -4px 5px rgba(0, 0, 0, 0.6);
      border: 0px solid black;
    }
   .my_name {
      letter-spacing: -8px;
    }
  }
 /* 頭部標(biāo)題.header_title 結(jié)束 */
  /* **********頭部中心.header_center 開始  */
  .header_center {
    height: 66px;
    color: rgb(255, 255, 255);
    text-align: center;
    max-width: 1450px;
    margin: 0 auto;
   .summary {
      position: fixed;
      top: 0;
      left: 10%;
    }
   /* 修改說(shuō)明.update_summary 開始 */
    .update_summary {
      font-size: 20px;
      font-weight: 700;
      position: relative;
      cursor: pointer;
      right: -700px;
      color: #f40b0b;
   }
   .update_summary:hover+.css_summary_collapse {
      grid-template-rows: 1fr;
    }
   .css_summary_collapse {
      display: grid;
      grid-template-rows: 0fr;
      transition: grid-template-rows 0.3s cubic-bezier(0.34, 0.69, 0.1, 1);
     div {
        background-color: #012705;
        overflow: hidden;
        width: 180px;
        margin: 0 1200px;
        z-index: 9999;
       p {
          position: relative;
          color: #ffffff;
          margin: 0 auto;
        }
      }
    }
   /* 修改說(shuō)明.update_summary 結(jié)束 */
    /* 當(dāng)前時(shí)間 #current_time 開始*/
    #current_time {
      position: fixed;
      color: #ffea00;
      font-size: 30px;
      top: 20px;
      left: 50%;
    }
   /* 當(dāng)前時(shí)間 #current_time 結(jié)束*/
    /* 頭部導(dǎo)航區(qū).header_nav  開始 */
    .header_nav {
      position: fixed;
      top: 35px;
      left: 15%;
      font-size: 20px;
      border-bottom: 2px solid #f6f4db;
     .header_pagination {
        display: inline-block;
       /* 在第一個(gè)分頁(yè)鏈接和最后一個(gè)分頁(yè)鏈接添加圓角:開始 */
        li:first-child a {
          border-top-left-radius: 5px;
          border-bottom-left-radius: 5px;
        }
       li:last-child a {
          border-top-right-radius: 5px;
          border-bottom-right-radius: 5px;
        }
       /* 在第一個(gè)分頁(yè)鏈接和最后一個(gè)分頁(yè)鏈接添加圓角:結(jié)束 */
        li {
          list-style: none;
          display: inline;
         .home_page {
            background-color: #4CAF50;
            color: white;
            border: 1px solid #4CAF50;
           &:hover {
              background-color: #ddd;
              color: rgb(245, 5, 5);
            }
          }
         a {
            float: left;
            margin: 0 15px;
            text-decoration: none;
            transition: background-color .3s;
            border: 1px solid #ddd;
            color: rgb(252, 232, 130);
           &:hover:not(.home_page) {
              background-color: #ddd;
              font-size: 26px;
              color: rgb(255, 255, 255);
            }
          }
        }
      }
    }
   /* 頭部導(dǎo)航區(qū).header_nav  結(jié)束 */
    #openButton {
      font-size: 20px;
     &:hover {
        background-color: #4CAF50;
        color: white;
        font-size: 24px;
      }
    }
  }
 /* **********頭部中心.header_center 結(jié)束  */
  /* 中部編輯文本區(qū) .edit_text和搜索區(qū).memo_search *******************開始 */
  /* ****************編輯文本區(qū) .edit_text 開始 */
  .edit_text {
    position: fixed;
    flex-direction: column;
    box-sizing: border-box;
    top: 70px;
    left: 180px;
    width: 1284px;
    border: 1px solid rgb(134, 133, 133);
   #myForm {
      border: 1px solid rgb(134, 133, 133);
      display: flex;
      flex-direction: column;
      box-sizing: border-box;
      width: 530px;
      border-radius: 10px;
    input[type="file"] {
        margin: 3px;
        height: 30px;
        background-color: #11b711a7;
      }
     textarea {
      z-index: 9999;
        font-size: 20px;
        margin: 3px;
        color: #ffffff;
        text-shadow: 1px 1px 1px #000;
        background-color: #062506b5;
       &::placeholder {
          font-size: 20px;
          color: #ffffff;
        }
      }
     .abb-text,
      input[type="reset"] {
        width: 55px;
        margin: 3px 58px;
      }
    }
   /* 文本操作窗口按鈕刪除按鈕.delete 開始 */
    .delete {
      position: sticky;
      top: 0px;
      background: #f30303;
     &:hover {
        background: #000;
      }
    }
   /* 文本操作窗口按鈕刪除按鈕.delete 結(jié)束 */
    /* ****編輯文本區(qū) .edit_text 結(jié)束 */
    /* 搜索區(qū).memo_search 開始 */
    .memo_search {
      position: absolute;
      border-radius: 10px;
      top: -2px;
      left: 630px;
     input {
       /* background-color: #11b711a7; */
        &::placeholder {
          font-size: 20px;
          color: #ffffff;
        }
      }
     input[type="text"] {
       background: linear-gradient(to top left, #022c05, #000000);
       font-size: 25px;
        width: 440px;
        border-radius: 5px 0 0 5px;
        margin: 2px 5px;
        border: 0px;
        outline: none;
        cursor: text;
      }
     input[type="button"],
      button {
        position: relative;
        top: -1px;
        left: -8px;
        border: 0px;
        outline: none;
        background-color: #e4ede4b5;
        padding: 2px 0px;
        border-radius: 0 5px 5px 0;
       &:hover {
          background-color: #ff0202;
          color: #ffffff;
        }
      }
    }
   #baidu_list {
      height: auto;
      border: 1px solid #ccc;
      display: none;
      position: absolute;
      top: 130px;
      left: 7px;
    }
   #baidu_search ul li {
      width: 498px;
      height: 30px;
      line-height: 30px;
      text-indent: 10px;
      font-size: 16px;
      list-style: none;
    }
   #baidu_search li a {
      text-decoration: none;
    }
   #baidu_search ul li:hover {
      display: block;
      background: #ccc;
      font-size: 30px;
      color: #fff;
      z-index: 999;
    }
   /* 搜索區(qū).memo_search 結(jié)束 */
  }
 /* 中部編輯文本區(qū) .edit_text和搜索區(qū).memo_search *******************結(jié)束 */
  /* *****左側(cè)本地連接.local_connection 開始 ***** */
  .local_connection {
    position: fixed;
    top: 75px;
    left: 0;
    width: 170px;
    text-align: center;
   a {
      text-decoration: none;
      margin: 10px 0px;
      color: #ffea07;
      display: flex;
      justify-content: center;
     &:hover {
        color: #ff0303;
        font-size: 22px;
      }
    }
  }
 /* *****左側(cè)本地連接.local_connection 結(jié)束 ***** */
  /* ***右側(cè)常用網(wǎng)站 .right_websites開始  */
  .right_websites {
    position: fixed;
    top: 75px;
    right: 0;
    width: 170px;
    text-align: center;
   a {
      text-decoration: none;
      margin: 10px 0px;
      color: #ffea07;
      display: flex;
      justify-content: center;
     &:hover {
        color: #ff0303;
        font-size: 22px;
      }
    }
  }
 /* ***右側(cè)常用網(wǎng)站 .right_websites結(jié)束 */
  /* ****底部備忘內(nèi)容區(qū):.memo_content_area *****開始 */
  .memo_content_area {
    border: 1px solid rgb(134, 133, 133);
    max-width: 1300px;
    margin: 100px 180px;
    font-size: 20px;
   span {
      user-select: text;
      color: #0d7b1c;
     &:hover {
        color: #ffffff;
      }
     sub {
        position: sticky;
        top: 0px;
        color: rgb(252, 181, 181);
        text-shadow: 1px 1px 1px #030303;
        box-shadow:
          inset -2px -2px 3px rgba(255, 255, 255, 0.6),
          inset 2px 2px 3px rgba(0, 0, 0, 0.6);
        margin: 0px 10px;
        user-select: text;
        border-radius: 20px;
      }
    }
   .finish {
      /* text-decoration: underline; */
      /* text-decoration-color: rgb(255, 0, 0); */
      background-color: rgb(191, 210, 255);
      color: rgb(255, 250, 250);
      text-shadow: 1px 1px 1px #030303;
      box-shadow:
        inset -2px -2px 3px rgba(255, 255, 255, 0.6),
        inset 2px 2px 3px rgba(0, 0, 0, 0.6);
    }
   a {
      text-decoration: none;
      color: #ebf704;
    }
  }
 /* ****底部備忘內(nèi)容區(qū):.memo_content_area *****結(jié)束 */
</style>

<body>
  <!-- 左側(cè)本地連接.local_connection 開始 -->
  <div class="local_connection">
    <span>本地連接</span>
    <hr />
    <ul>
      <li><a href="D:\My homepage\本地連接\js生成隨機(jī)數(shù).html">隨機(jī)數(shù)生成器</a></li>
      <li><a href="D:\My homepage\本地連接\本地連接計(jì)算器.html">計(jì)算器</a></li>
      <li><a href="D:\My homepage\本地連接\todos備忘錄.html">todos備忘錄</a></li>
      <!-- <li><a href="D:\My homepage\本地連接\長(zhǎng)久保存todos.html" >todos保存</a></li> -->
    </ul>
  </div>
  <!-- 左側(cè)本地連接.local_connection 結(jié)束 --------------------------------------------------------------------------------->
  <!-- 右側(cè)常用網(wǎng)站 .right_websites開始-->
  <div class="right_websites">
    <span>常用網(wǎng)站</span>
    <hr />
    <ul>
      <li><a href="https://cn.bing.com/search?q=%E7%BF%BB%E8%AF%91&qs=
        n&form=QBRE&sp=-1&lq=0&sm=csrmain&pq=%E7%BF%BB%E8%AF%91&sc
        =10-2&sk=&cvid=08CF7C75398B4C3C97E7AEC5D3D0921F&ghsh=0&ghacc=0&ghpl=" title="在線翻譯" class=""
          target="_blank">在線翻譯</a></li>
      <li><a
          
          title="原神大地圖" class="" target="_blank">原神大地圖</a></li>
      <li><a  title="bilibili" class="" target="_blank">嗶哩嗶哩</a></li>
      <li><a  target="_blank"> 建站學(xué)習(xí)網(wǎng) </a></li>
      <li><a  title=" 菜鳥教程" class="" target="_blank">菜鳥教程</a></li>
      <li><a  title="MDN網(wǎng)絡(luò)文檔" class="" target="_blank">MDN網(wǎng)絡(luò)文檔</a></li>
      </li>
      <li><a  target="_blank"> JavaScript 框架vue </a></li>
      <li><a  target="_blank"> w3schools 教程 </a></li>
      <li><a  target="_blank"> 現(xiàn)代 JavaScript 教程 </a></li>
      <li><a  target="_blank"></a></li>
      <li><a  target="_blank">Vue3組件庫(kù)</a></li>
      <li><a  title="與妖為鄰CSDN博客" class=""
          target="_blank">與妖為鄰的CSDN博客</a>
    </ul>
  </div>
  <!-- 右側(cè)常用網(wǎng)站 .right_websites結(jié)束---------------------------------------------------------------------------------------->
  <!-- -------頭部標(biāo)題.header_title 開始 -->
  <div class="header_title">
    <img src="file:///D:\My homepage\img\jpg\tuzi3.jpg" alt="與妖為鄰">
    <h2 class="my_name">與妖為鄰</h2>
    <h2 class="memo">備忘錄</h2>
  </div>
  <!-- 頭部中心.header_center 開始 --修改說(shuō)明.summary 開始 -->
  <div class="header_center">
    <!-- 修改說(shuō)明.summary 開始-->
    <div class="summary">瀏覽器主頁(yè),整理本地資源!備忘日常生活、各類教程、網(wǎng)頁(yè)素材! key=todotext
    </div> <span class="update_summary">第24次(0.4.0)更新</span>
    <div class="css_summary_collapse">
      <div class="update_notes">
        <p>第24次(0.4.0)更新:文本編輯框不再隱藏,又增加了嗶哩嗶哩搜索和必應(yīng)搜索。</p>
      </div>
    </div>
    <!-- 修改說(shuō)明.summary 結(jié)束-->
    <div id="current_time">當(dāng)前時(shí)間</div>
    <div class="header_nav">
      <ul class="header_pagination">
        <li><a href="file:///C:\Users\90917\Desktop\備忘錄.html" class="home_page">首頁(yè)</a></li>
        <li><a href="D:\My homepage\本地連接\mylogs原生備忘錄.html">日志</a></li>
        <li><a href="D:\My homepage\img">相冊(cè)</a></li>
        <li><a href="#">更多</a></li>
        <li><a href="D:\My homepage\本地連接\html5代碼賬號(hào)密碼備忘錄樣本.html">聯(lián)系我</a></li>
      </ul>
      <button id="openButton">打開本地文件</button>
    </div>
  </div>
  <!--  頭部中心 .header_center 結(jié)束-->
  <!-- 中部編輯文本區(qū) .edit_text和搜索區(qū).memo_search -----開始 -->
  <div class="edit_text ">
    <form id="myForm">
      <input type="file" name="inputfile" accept="text/plain, text/css, text/html, text/javascript, text/markdown"
        class="background3D" />
      <textarea class="up-textarea" name="uptextarea" rows="1" cols="30%"
        placeholder="選擇本地txt、js、css或html文件,文件內(nèi)容會(huì)被自動(dòng)讀取"></textarea>
      <div>
        <button type="text" class="abb-text">添加</button>
        <input type="reset" value="重置">
        <button id="delete" class="delete">對(duì)選擇進(jìn)行刪除</button>
      </div>
    </form>
    <!-- 搜索區(qū).memo_search 開始-->
    <div class="memo_search">
      <div id="bilibili_search">
        <form onsubmit="return bilibili_text()">
          <input type="text" class="bilibili_text" placeholder="嗶哩嗶哩" autocomplete="off" autofocus>
          <!-- <input type="button" name="btn" id="bilibili_btn" value="嗶哩嗶哩" onclick="return search" /> -->
          <button onclick="return search">
            嗶哩嗶哩
         </button>
        </form>
        <!-- <ul id=""></ul> -->
        <div id="bing_search">
          <form onsubmit="return bing_text()">
            <input type="text" class="bing_text" placeholder="必應(yīng)搜索">
            <button onclick="return search">
              必應(yīng)搜索
            </button>
          </form>
          <!-- <ul id=""></ul> -->
        </div>
        <div id="baidu_search">
          <p>
            <input type="text" id="baidu_text" placeholder="百度一下,你就知道">
            <input type="button" name="btn" id="baidu_btn" value="百度一下" />
          </p>
          <ul id="baidu_list"></ul>
        </div>
      </div>
    </div>
    <!-- 搜索區(qū).memo_search 結(jié)束-->
  </div>
  <!-- 中部編輯文本區(qū) .edit_text和搜索區(qū).memo_search -----結(jié)束 -->
  <!-- ------------備忘內(nèi)容區(qū):.memo_content_area *****開始 ----------------------------------------------->
  <div class="memo_content_area" id="memo">
  </div>
  <!-- ------------備忘內(nèi)容區(qū):.memo_content_area *****結(jié)束 ------------------------------------------------>
 </div>
</body>
<script>
  /* *********當(dāng)前時(shí)間*current_time********************************************************* */
  var current_time = document.getElementById("current_time");
  function showTime(time) {
    var now = new Date();
    var year = now.getFullYear();
    var month = now.getMonth();
    var day = now.getDate();
    var hour = now.getHours();
    var minu = now.getMinutes();
    var second = now.getSeconds();
    month = month + 1;
    var arr_work = new Array("星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六");
    var week = arr_work[now.getDay()];
    month = month < 10 ? "0" + month : month;//時(shí)間月份個(gè)位補(bǔ)0
    day = day < 10 ? "0" + day : day;
    hour = hour < 10 ? "0" + hour : hour;
    minu = minu < 10 ? "0" + minu : minu;
    second = second < 10 ? "0" + second : second;
    var time = year + "年" + month + "月" + day + "日 " + week + " " + hour + ":" + minu + ":" + second;
    current_time.innerHTML = time;
  }
  window.setInterval("showTime(current_time)", 1000);
  /* *********************當(dāng)前時(shí)間.current_time 結(jié)束***************************************************** */
  /****提示彈窗無(wú)需點(diǎn)擊的函數(shù)*****開始*****************************************/
  function displayAlert(type, data, time) {
    var prompt = document.createElement("div");
    if (type == "success") {
      prompt.style.width = "200px";
      prompt.style.backgroundColor = "#009900";
    } else if (type == "error") {
      prompt.style.width = "280px";
      prompt.style.backgroundColor = "#990000";
    } else if (type == "info") {
      prompt.style.backgroundColor = " #e6b800";
      prompt.style.width = "600px";
    } else {
      return;
    }
    prompt.id = "prompt";
    prompt.style.textAlign = "center";
    prompt.style.position = "fixed";
    prompt.style.height = "60px";
    prompt.style.marginLeft = "-100px";
    prompt.style.marginTop = "-30px";
    prompt.style.left = "30%";
    prompt.style.top = "30%";
    prompt.style.color = "white";
    prompt.style.fontSize = "25px";
    prompt.style.borderRadius = "20px";
    prompt.style.textAlign = "center";
    prompt.style.lineHeight = "60px";
    if (document.getElementById("") == null) {
      document.body.appendChild(prompt);
      prompt.innerHTML = data;
      setTimeout(function () {
        document.body.removeChild(prompt);
      }, time);
    }
  }
  /****提示彈窗無(wú)需點(diǎn)擊的函數(shù)*****結(jié)束*****************************************/
  /*中部 嗶哩嗶哩#bilibili_search *******************開始 */
  function bilibili_text() {
    if (document.querySelector(".bilibili_text").value != "") {
      window.location. + document.querySelector(".bilibili_text").value;
      document.querySelector(".bilibili_text").value = "";
    }
    return false;
  }
  /*中部 嗶哩嗶哩#bilibili_search *******************結(jié)束 */
  /*中部必應(yīng)搜索:#bing_search *******************開始 */
  function bing_text() {
    if (document.querySelector(".bing_text").value != "") {
      window.location. + document.querySelector(".bing_text").value;
      document.querySelector(".bing_text").value = "";
    }
    return false;
  }
  /*中部必應(yīng)搜索:#bing_search *******************結(jié)束 */
  /* 中部百度搜索:#baidu_search *******************開始 */
  var txt = document.getElementById("baidu_text");
  var oUl = document.getElementById("baidu_list");
  var oBtn = document.getElementById("baidu_btn");
  txt.onkeyup = function () {
    oUl.innerHTML = "";
    var val = txt.value;
    var oScript = document.createElement("script");//動(dòng)態(tài)創(chuàng)建script標(biāo)簽  
    oScript.src = "https://sp0.baidu.com/5a1Fazu8AA54nxGko9WTAnF6hhy/su?wd=" + val + "&cb=callback";
    //添加鏈接及回調(diào)函數(shù)  
    document.body.appendChild(oScript);//添加script標(biāo)簽  
    document.body.removeChild(oScript);//刪除script標(biāo)簽  
  }
  //回調(diào)函數(shù)  
  function callback(data) {
    data.s.forEach(function (value) {
      var oLi = document.createElement("li");
      oLi.innerHTML = "<a href=\"https://www.baidu.com/s?wd=" + value + "\">" + value + "</a>";
      oUl.appendChild(oLi);
    })
    oUl.style.display = "block";
  }
  //點(diǎn)擊跳轉(zhuǎn)到百度頁(yè)面,并搜索其中內(nèi)容
  oBtn.onclick = function () {
    var val = txt.value;
    location. + val + "&cl=3";
  }
  /* 中部百度搜索區(qū):#baidu_search *******************結(jié)束 */
  /* 
/***********************備忘內(nèi)容區(qū):.memo_content_area *****開始*******************************/
  var uptext = document.querySelector(".up-textarea");
  var addto = document.querySelector(".abb-text");
  var text = document.querySelector(".memo_content_area");
  /*************添加事件*****************/
  addto.onclick = function () {
    inserhtml(uptext.value, '');
    // 添加后清空輸入框
    uptext.value = '';
    // 焦點(diǎn)放回輸入框
    uptext.focus();
    savetodo();
  }
  /*************savetodo函數(shù)****************/
  var savetodo = function () {
    let todoarr = [];
    let todojs = {};
    var econtent = document.querySelectorAll('.JS_content');
    for (let index = 0; index < econtent.length; index++) {
      todojs.name = econtent[index].innerHTML;
      todojs.finish = econtent[index].classList.contains('finish');
      todoarr.push(todojs);
      todojs = {};
    }
    save(todoarr);
  }
  var loadtodo = function () {
    let todoarr = load();
    for (let index = 0; index < todoarr.length; index++) {
      inserhtml(todoarr[index].name, todoarr[index].finish ? 'finish' : '');
    }
  }
  /*********本地持久儲(chǔ)存(localStorage)函數(shù)*****************************/
  var save = function (arr) {
    /**JSON.stringify(arr) 先將數(shù)組轉(zhuǎn)換為字符串     *localStorage.todotext 然后將字符串保存到本地的todotext中*/
    localStorage.todotext = JSON.stringify(arr);
  }
  /**
   *讀取函數(shù),把todotext轉(zhuǎn)成數(shù)組
   *然后返回?cái)?shù)組*/
  var load = function (arr) {
    var arr = JSON.parse(localStorage.todotext);
    return arr;
  }
  /**********************finish樣式函數(shù)*****************************/
  /**********************按鈕點(diǎn)擊事件*****************************/
  text.onclick = function () {
    var tg = event.target;
    // 獲取父元素下的所有子元素
    var tgkids = tg.parentElement.children;
    /*******************************對(duì)復(fù)選框的點(diǎn)擊事件******************************/
    if (tgkids[0].checked) {
      tgkids[1].classList.add("finish");
    }
    else {
      tgkids[1].classList.remove("finish");
    }
    // 保存更改的樣式
    savetodo();
    /***********************對(duì)選擇的進(jìn)行刪除********************************************/
    var Select = document.getElementById("delete");
    Select.onclick = function () {
      if (confirm("是否刪除所選?")) {
        var check = document.getElementsByName("checkbox");
        for (var i = 0; i < check.length; i++) {
          if (check[i].checked) {
            check[i].parentElement.remove();
            i--;
            // 刪除后保存
            savetodo();
          }
        }
      }
    }
  }
  var inserhtml = function (val, cls) {
    text.insertAdjacentHTML("beforeend",
      `<div>
            <input type="checkbox" name='checkbox'>                        
            <span  class='JS_content ${cls}'>${val}</span>       </div>`
    )
  }
  loadtodo();
  /**************************打開URL按鈕的JavaScript******************************************/
  // 獲取打開URL按鈕元素
  var openBtn = document.getElementById("openButton");
  // 添加點(diǎn)擊事件處理程序
  openBtn.addEventListener('click', function () {
    // 獲取文件路徑
    // 這里假設(shè)您已經(jīng)有一個(gè)函數(shù)來(lái)獲取文件路徑,例如 prompt('請(qǐng)輸入文件路徑', 'D:/前端學(xué)習(xí)', '_blank');
    var filePath = prompt("請(qǐng)輸入網(wǎng)站地址或者本地文件路徑", "D:\My homepage");
    if (filePath) {
      // 使用window.location對(duì)象的assign()方法導(dǎo)航到指定文件
      // window.location.assign(filePath);
      // 或者使用window.open()方法打開新窗口導(dǎo)航到指定文件
      window.open(filePath);
    } else {
      displayAlert('info', '未提供有效的文件路徑!', 1500);
      // alert("未提供有效的文件路徑!");
    }
  });
  /**************************本地文件讀取的函數(shù)******************************************/
  window.onload = function () {
    var text = document.getElementsByName('uptextarea')[0],
      inputFile = document.getElementsByName('inputfile')[0];
    //上傳文件
    inputFile.onchange = function () {
      console.log(this.files);
      var reader = new FileReader();
      reader.readAsText(this.files[0], 'UTF-8');
      reader.onload = function (e) {
        // urlData就是對(duì)應(yīng)的文件內(nèi)容
        var urlData = this.result;
        text.value = urlData;
      };
    };
  };
  /**************************復(fù)制文本******************************************/
  var oContent = document.getElementById('memo');
  oContent.ondragend = function () {
    document.execCommand("Copy");
    // alert("復(fù)制成功")
    displayAlert('error', '復(fù)制成功!', 1500);
  };
</script>

</html>

到了這里,關(guān)于第24次修改了可刪除可持久保存的前端html備忘錄:文本編輯框不再隱藏,又增加了嗶哩嗶哩搜索和必應(yīng)搜索的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!

本文來(lái)自互聯(lián)網(wǎng)用戶投稿,該文觀點(diǎn)僅代表作者本人,不代表本站立場(chǎng)。本站僅提供信息存儲(chǔ)空間服務(wù),不擁有所有權(quán),不承擔(dān)相關(guān)法律責(zé)任。如若轉(zhuǎn)載,請(qǐng)注明出處: 如若內(nèi)容造成侵權(quán)/違法違規(guī)/事實(shí)不符,請(qǐng)點(diǎn)擊違法舉報(bào)進(jìn)行投訴反饋,一經(jīng)查實(shí),立即刪除!

領(lǐng)支付寶紅包贊助服務(wù)器費(fèi)用

相關(guān)文章

覺得文章有用就打賞一下文章作者

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

請(qǐng)作者喝杯咖啡吧~博客贊助

支付寶掃一掃領(lǐng)取紅包,優(yōu)惠每天領(lǐng)

二維碼1

領(lǐng)取紅包

二維碼2

領(lǐng)紅包