刺猬在天冷时围抱取暖,但保持一定距离避免相互刺|

jinganglang567

园龄:4年5个月粉丝:0关注:20

2023-06-30 22:17阅读: 24评论: 0推荐: 0

js基础速成

js记录

js中对象类型 object

创建对象

var test=new object();

直接添加属性

test.name='熊大'

没有属性,系统不会报错 ,会返回 undefined

删除属性 delete test.name

创建对象 var obj={} 或者 new object

js中函数也是一个对象

var fun = new function()

常规写法

function fun(){
    
}
var fun=function(){
    
}

立即执行函数

(function(){})(参数)

由于函数也是对象,所以就可以直接给构造对象 ,所以函数名前有new 当成构造函数或者对象 没有new就是普通函数的返回值

function Person(){
    this.name='sasa';
}
var person=new Person();

数组也是对象

var arr=new Array() 或者 var arr=[]

正则表达式

var reg = new regexp('表达式规则',‘i’) i表示忽略大小写

检测符合表达式

reg.test(str)

正则表达式也可以是 var reg=/ad/ada/d/i

js重点dom与bom

html 转换成dom树 ,通过节点node之间的关系来操作每个元素

页面文档加载完成才执行函数的属性 onload函数

document.queryselector(“”)根据css类来选择

window.onload函数是页面文档加载完,才会执行的函数

js修改style

元素.style.属性=“”

获得元素的正在显示的样式对象

var style1= getcomputedstyle(标签,null);

style1.width=""

style.clientwidth返回数值不返回px

事件冒泡 事件的向上传导,后代元素的事件(鼠标单击)被触发时,其祖先事件也会被触发,

取消冒泡

为元素绑定多个函数 addeventlistener

绑定多个函数的模板

bom

定时器

延时器

json属于js语言中特殊字符串

json.parse(tets)转换成js对象

json.stringify(js) js对象转化为json字符串

本文作者:jinganglang567

本文链接:https://www.cnblogs.com/tgfoven/p/17517943.html

版权声明:本作品采用知识共享署名-非商业性使用-禁止演绎 2.5 中国大陆许可协议进行许可。

posted @   jinganglang567  阅读(24)  评论(0编辑  收藏  举报
  1. 1 look after you louis tomlinson
  2. 2 just hold on louis tomlinson
  3. 3 i can steven cooper
  4. 4 rock me one direction
  5. 5 just can't let her go one direction
  6. 6 this town Niall Horan
  7. 7 cut in love july
  8. 8 nemo 夜愿
  9. 9 in the end Black Veil Brides
  10. 10 glad you came the wanted
  11. 11 chasing the sun the wanted
  12. 12 TAKE MY HAND simple plan
  13. 13 wish i had an angel 夜愿
just hold on - louis tomlinson
00:00 / 00:00
An audio error has occurred, player will skip forward in 2 seconds.

作词 : Sasha Alex Sloan/Eric Rosse

作曲 : Steve Aoki/Louis Tomlinson/Sasha Alex Sloan/Nolan Lambroza/Eric Rosse

Wish that you could build a time machine

So you could see

The things no one can see

Feels like you're standing on the edge

Looking at the stars

And wishing you were them

What do you do when a chapter ends?

Do you close the book and never read it again?

Where do you go when your story's done?

You can be who you were or who you'll become

Oooh

If it all goes wrong

Oooh

Darling just hold on

The sun goes down and it comes back up

The world it turns no matter what

Oooh

If it all goes wrong

Darling just hold on

Oooh

Darling just hold on

Oooh

It's not over until it's all been said

It's not over until your dying breath

So what do you want them to say when you're gone?

That you gave up or that you kept going on?

What do you do when a chapter ends?

Do you close the book and never read it again?

Where do you go when your story's done?

You can be who you were or who you'll become

Oooh

If it all goes wrong

Oooh

Darling just hold on

The sun goes down and it comes back up

The world it turns no matter what

Oooh

If it all goes wrong

Darling just hold on

Oooh

Darling just hold on

Oooh

Oooh

If it all goes wrong

Oooh

Darling just hold on

Oooh

If it all goes wrong

Darling just hold on

点击右上角即可分享
微信分享提示
评论
收藏
关注
推荐
深色
回顶
收起