前端小知識

$CSS

  • button裏不嵌入a標籤 disabled效果會不理想
  • css的屬性選擇器(w3school查看詳細)
    input[type="text"]{color:blue;width:100px}
    <input type="text" value="屬性選擇器">

$代碼編輯器

vscode

  • vscode訪問git,下載devServer,ctrl+shift+p調出命令框,搜索devServer:start
    http://localhost/admin/config/xxx.html (http://可省略)查看javascript

  • vscode設置中文: 下載Chinese Language Pack > ctrl+shift+p調出命令行 > Configure Display Language > "locale":"zh-CN"php

  • 必裝插件
    Atom One Light Theme - Auto Close Tag 自動補齊標籤 - Auto Rename Tag 自動跟隨標籤改動 - Beatify - Chinese Language Pack 中文包- CSS Peek 找到對應的css文件 - devServer 服務器打開 - ESLint 檢查js的語法錯誤 - HTML CSS Support - OmniPascal - Open Preview - open in browser - Path Intellisense - Prettier-Code formatter - Quokka.js - vscode-icons - Tiny Light - Quiet Light for VSC - Vetur
  • 多行註釋
    多行註釋.png
  • 隱藏工做區中的node_modules文件夾,防止電腦加載卡死
    ctrl+shift+p——open user setting——點擊右上角的 {} ——在setting.json里加入"files.exclude": { "node_modules/": true }這段代碼css

webstorm破解

網站一:https://www.jianshu.com/p/4ce97b360c13
網站二:http://www.javashuo.com/article/p-xbenrfor-go.html
網站三:http://www.javashuo.com/article/p-hyhyxpvb-es.htmlhtml

$github

  • 先拉取(pull)後合併,再上傳(push)
  • github桌面端

$百度編輯器

  1. 首先要引入https://ueditor.baidu.com/ueditor/ueditor.config.js,https://ueditor.baidu.com/ueditor/ueditor.all.js兩個js文件
    2.<script type="text/javascript">
    UE.getEditor('myEditor',{
    //這裏能夠選擇本身須要的工具按鈕名稱,此處僅選擇以下五個
    toolbars:[['FullScreen', 'Source', 'Undo', 'Redo','Bold','test']],
    //focus時自動清空初始化時的內容
    autoClearinitialContent:true,
    //關閉字數統計
    wordCount:false,
    //關閉elementPath
    elementPathEnabled:false,
    //默認的編輯區域高度
    initialFrameHeight:300,
    //更多其餘參數,請參考ueditor.config.js中的配置項
    serverUrl: '/server/ueditor/controller.php'
    })
    </script>
<div class="ueditor-box">
            <div id="ueditor"></div>
   </div>

4.更多信息百度editor示例 > 「文檔」中查看java

當前文件下打開命令行

shift+鼠標右鍵,在此處打開Powershell窗口node

閉包
/*
    * 閉包的概念:函數A中,有一個函數B,函數B中能夠訪問函數A中定義的變量或者是數據,此時造成了閉包(這句話暫時不嚴謹)
    * 閉包的模式:函數模式的閉包,對象模式的閉包
    * 閉包的做用:緩存數據,延長做用域鏈
    * 閉包的優勢和缺點:緩存數據
    *
    * 閉包的應用
    *
    *
    * */


    //函數模式的閉包:在一個函數中有一個函數
    function f1() {
//      var num=10;
//      //函數的聲明
//      function f2() {
//        console.log(num);
//      }
//      //函數調用
//      f2();
//    }
//    f1();

    //對象模式的閉包:函數中有一個對象

//    function f3() {
//      var num=10;
//      var obj={
//        age:num
//      };
//      console.log(obj.age);//10
//    }
//    f3();
相關文章
相關標籤/搜索