javascript - Big question for help!!!!!Why can this output be different?
欧阳克
欧阳克 2017-07-05 10:51:56
0
1
804

As shown in the picture, why are the output attributes different? ? ? ? ?

 
欧阳克
欧阳克

温故而知新,可以为师矣。 博客:www.ouyangke.com

reply all (1)
某草草
moveDown(item,e) { item.moveYse = true console.log(item,e,'down') item.startX = e.clientX item.startY = e.clientY },
moveUp(item,e) { item.moveYse = false let l = e.clientY - item.startY if (l < 50) { console.log(l) item.startY = 0 item.startX = 0 item.top = 0 item.left = 0 }else { } console.log(item.moveYse,item,item.moveYse,'up') }

When you printconsole.log(item.moveYse,item,item.moveYse,'up'), it is actually false, but when you click on the item object in the console, Since the moveDown method is executed, item.mouseYse is changed back to true.

    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template
    About us Disclaimer Sitemap
    php.cn:Public welfare online PHP training,Help PHP learners grow quickly!