變量作用域變量有作用域,外部與函數(shù)內(nèi)互不可見,除非成為全局變量,兩種方式,可以通過global 聲明為全局變量,或變?yōu)?GLOBALS超全局變量的參數(shù) $one = 200;$two = 300;const NATION ='中國';function...
PHP集成環(huán)境搭建我的Windows無法安裝phpenv;繼續(xù)使用之前安裝的phpstudy;新建網(wǎng)站hello world URL組成URL由協(xié)議+二級域名+主機名(域名)+端口號+資源路徑構(gòu)成;例如http或https就是常見協(xié)議;二級域名常見的...
import carts from "./carts.js" const items = document.querySelectorAll('.carts-body .item') const total = document.quer...
node.js基本操作: 查看路徑PS C:\Users\hao_z\Desktop\php> pwdPath----C:\Users\hao_z\Desktop\php查看版本PS C:\Users\hao_z\Desktop\php>node -...
fetch請求:function getData(ele){const url = 'https://jsonplaceholder.typicode.com/todos/20'fetch(url).then(res => res.json()).t...
/** * 輪播圖功能模塊 */import imgArr from './data.js'// 1.創(chuàng)建圖片組function createImg(imgs){ // 創(chuàng)建文檔片段 const frag = new DocumentFr...
// import ...
HTML文檔
獲取DOM元素的常用方法const items = document.querySelectorAll('.list>li')console.log(items);const item = document.querySelector('.list>...
隊列與循環(huán)隊列// 隊列 arr = ['a','b','c','d'] function que1(arr, str){ arr.push(str) arr.shift() ...
// 對象字面量簡化 let grade1 = { // 屬性 code1: '48H', // 方法 greet1: functi...
// 1.命名函數(shù) 聲明提升 function MultiArr(arr1, arr2){ return `${arr1} * ${arr2} = ${arr1[0] * arr2[0] + arr...
熱門推薦