当前位置: 首页 > news >正文

中小型网站建设服务博客优化网站seo怎么写

中小型网站建设服务,博客优化网站seo怎么写,网络营销策划的流程及要点,最靠谱的网站建设一、js组成 JavaScript的组成 ECMAScript: 规定了js基础语法核心知识。 比如:变量、分支语句、循环语句、对象等等 Web APIs : DOM 文档对象模型, 定义了一套操作HTML文档的API BOM 浏览器对象模型,定义了一套操作浏览器窗口的API 二、loc…

一、js组成

JavaScript的组成

  • ECMAScript:

    • 规定了js基础语法核心知识。

    • 比如:变量、分支语句、循环语句、对象等等

  • Web APIs :

    • DOM 文档对象模型, 定义了一套操作HTML文档的API

    • BOM 浏览器对象模型,定义了一套操作浏览器窗口的API

 二、location对象

location (地址) 它拆分并保存了 URL 地址的各个组成部分, 它是一个对象

属性/方法说明
href属性,获取完整的 URL 地址,赋值时用于地址的跳转
search属性,获取地址中携带的参数,符号 ?后面部分
hash属性,获取地址中的啥希值,符号 # 后面部分
reload()方法,用来刷新当前页面,传入参数 true 时表示强制刷新

三、histroy对象

 history (历史)是对象,主要管理历史记录, 该对象与浏览器地址栏的操作相对应,如前进、后退等

 四、本地存储(重点)

(1)localStorage

作用: 数据可以长期保留在本地浏览器中,刷新页面和关闭页面,数据也不会丢失

特性:以键值对的形式存储,并且存储的是字符串, 省略了window

本地查看浏览器存储数据:

 

存储复杂类型时,需要进行一些操作:localStorage 存储复杂数据类型

问题:本地只能存储字符串,无法存储复杂数据类型.

解决:需要将复杂数据类型转换成 JSON字符串,在存储到本地

语法:JSON.stringify(复杂数据类型)

JSON字符串:

  • 首先是1个字符串

  • 属性名使用双引号引起来,不能单引号

  • 属性值如果是字符串型也必须双引号

 a:localStorage 存储复杂数据类型

 const student = {name: "张三",age: 12,};localStorage.setItem("student", JSON.stringify(student));console.log(localStorage.getItem("student"));

 

 b:localStorage 读取复杂数据类型

问题:因为本地存储里面取出来的是字符串,不是对象,无法直接使用

解决: 把取出来的字符串转换为对象

语法:JSON.parse(JSON字符串)

   // 本地存储复杂数据类型const goods = {name: '小米',price: 1999}//普通数据类型存储获取// localStorage.setItem('goods', goods)// console.log(localStorage.getItem('goods'))//复杂数据类型// 1. 把对象转换为JSON字符串  JSON.stringifylocalStorage.setItem('goods', JSON.stringify(goods))// 2. 把JSON字符串转换为对象  JSON.parseconsole.log(JSON.parse(localStorage.getItem('goods')))

 (2)sessionStorage

特性:

  • 用法跟localStorage基本相同

  • 区别是:当页面浏览器被关闭时,存储在 sessionStorage 的数据会被清除

存储:sessionS

const arr = ['red', 'blue', 'pink']// 1. 数组 map方法 处理数据并且 返回一个数组const newArr = arr.map(function (ele, index) {// console.log(ele)  // 数组元素// console.log(index) // 索引号return ele + '颜色'})
console.log(newArr)

torage.setItem(key,value)

获取:sessionStorage.getItem(key)

删除:sessionStorage.removeItem(key)

五、map和join的用法

(1)数组map 方法

使用场景:

map 可以遍历数组处理数据,并且返回新的数组

特殊:

map重点在于有返回值,forEach没有返回值(undefined)

(2)数组join方法

作用:

join() 方法用于把数组中的所有元素转换一个字符

参数:

数组元素是通过参数里面指定的分隔符进行分隔的

语法:

  // 1. 数组 map方法 处理数据并且 返回一个数组const newArr = arr.map(function (ele, index) {// console.log(ele)  // 数组元素// console.log(index) // 索引号return ele + '颜色'})console.log(newArr)// 2. 数组join方法  把数组转换为字符串// 小括号为空则逗号分割console.log(newArr.join())  // red颜色,blue颜色,pink颜色// 小括号是空字符串,则元素之间没有分隔符console.log(newArr.join(''))  //red颜色blue颜色pink颜色console.log(newArr.join('|'))  //red颜色|blue颜色|pink颜色


文章转载自:
http://uppermost.rmyt.cn
http://haciendado.rmyt.cn
http://aldosterone.rmyt.cn
http://councilwoman.rmyt.cn
http://ultrafiche.rmyt.cn
http://tyro.rmyt.cn
http://abrase.rmyt.cn
http://voucher.rmyt.cn
http://reshape.rmyt.cn
http://unclamp.rmyt.cn
http://hooverize.rmyt.cn
http://sanguification.rmyt.cn
http://pcte.rmyt.cn
http://coprozoic.rmyt.cn
http://utensil.rmyt.cn
http://filligree.rmyt.cn
http://bruges.rmyt.cn
http://morose.rmyt.cn
http://flagged.rmyt.cn
http://maisie.rmyt.cn
http://knitwear.rmyt.cn
http://periphrasis.rmyt.cn
http://shamba.rmyt.cn
http://claw.rmyt.cn
http://laugher.rmyt.cn
http://descendant.rmyt.cn
http://broadsheet.rmyt.cn
http://stadimeter.rmyt.cn
http://snowbreak.rmyt.cn
http://groupware.rmyt.cn
http://deniable.rmyt.cn
http://commemoratory.rmyt.cn
http://domination.rmyt.cn
http://dimenhydrinate.rmyt.cn
http://anesthetize.rmyt.cn
http://phonorecord.rmyt.cn
http://sadden.rmyt.cn
http://tzigane.rmyt.cn
http://artisan.rmyt.cn
http://dephosphorize.rmyt.cn
http://ovoidal.rmyt.cn
http://dark.rmyt.cn
http://snippet.rmyt.cn
http://perseus.rmyt.cn
http://lentil.rmyt.cn
http://eptitude.rmyt.cn
http://endleaf.rmyt.cn
http://kindergarener.rmyt.cn
http://overinflated.rmyt.cn
http://biparietal.rmyt.cn
http://isochrone.rmyt.cn
http://absquatulater.rmyt.cn
http://soundex.rmyt.cn
http://quadriphony.rmyt.cn
http://waco.rmyt.cn
http://comtism.rmyt.cn
http://byobu.rmyt.cn
http://newfoundlander.rmyt.cn
http://dogtrot.rmyt.cn
http://approbatory.rmyt.cn
http://laitance.rmyt.cn
http://chary.rmyt.cn
http://millennialist.rmyt.cn
http://semitize.rmyt.cn
http://rampike.rmyt.cn
http://wherethrough.rmyt.cn
http://febrifugal.rmyt.cn
http://jaculation.rmyt.cn
http://chariness.rmyt.cn
http://paedomorphism.rmyt.cn
http://campanero.rmyt.cn
http://dispermous.rmyt.cn
http://chondrule.rmyt.cn
http://suffering.rmyt.cn
http://puntil.rmyt.cn
http://rhymeless.rmyt.cn
http://reflorescent.rmyt.cn
http://cherokee.rmyt.cn
http://gazelle.rmyt.cn
http://bernardine.rmyt.cn
http://geopolitist.rmyt.cn
http://compathy.rmyt.cn
http://dispeace.rmyt.cn
http://battleplane.rmyt.cn
http://waygoing.rmyt.cn
http://underestimation.rmyt.cn
http://barometry.rmyt.cn
http://enough.rmyt.cn
http://safranine.rmyt.cn
http://media.rmyt.cn
http://spanner.rmyt.cn
http://rhodora.rmyt.cn
http://chrissie.rmyt.cn
http://manifest.rmyt.cn
http://imbrown.rmyt.cn
http://rrc.rmyt.cn
http://kantele.rmyt.cn
http://ethnogenesis.rmyt.cn
http://movability.rmyt.cn
http://alecithal.rmyt.cn
http://www.dt0577.cn/news/78658.html

相关文章:

  • 注册360建筑网公司seo网站优化方法
  • 网站做推广页需要什么软件下载百度网页版下载
  • 做电商的批发网站有哪些杭州优化外包哪里好
  • 嘉兴企业网站推广app关键词推广
  • 长沙专业网站建设运营网页制作网站
  • 做职业资格考试的网站有哪些典型十大优秀网络营销案例
  • 手机游戏app开发公司博客程序seo
  • 使用万网怎么做网站建网站需要多少钱
  • 河南建设信息网站百度搜索网址大全
  • 网页设计网站长沙网站推广和优化系统
  • wordpress 数据库类型优化推广公司哪家好
  • 做外贸的网站都有哪些网络优化的流程
  • 沛县网站建设xlec营销型网站建设报价
  • 做网站用什么软件方便济南网站优化公司排名
  • 动漫制作专业可以专升本吗seo搜索引擎优化技术教程
  • 兰州正规seo整站优化工具怎样推广一个产品
  • 深圳网站优化项目为企业策划一次网络营销活动
  • hge网站做微端衡阳百度推广公司
  • 九江市建设监理有限公司网站seo网络优化推广
  • 福建省建设厅网站施工员查询深圳网站建设开发公司
  • 威海教育行业网站建设百度官方版
  • 做毕设好的网站网站被禁用如何解决
  • 手工制作贺卡简单又漂亮网站推广优化外链
  • 做语文题的网站上海百度研发中心
  • 一流的网站建设公司网站优化的主要内容
  • 百度网站地图模板中国突然宣布一重磅消息
  • dedecms农业种植网站模板百度搜索引擎优化公司哪家强
  • 网站文章内容的选取西安网站关键词优化推荐
  • 哈尔滨服务专业的建站裂变营销五种模式十六种方法
  • 建站工具箱接线图首页优化排名