search

Home  >  Q&A  >  body text

javascript - How to get the value of display in js? Or you can get it with vue@2.0

It is best to use js to get the display value

Console shows nothing

This is the code

怪我咯怪我咯2793 days ago643

reply all(2)I'll reply

  • PHP中文网

    PHP中文网2017-05-18 10:58:07

    const displayVal = document.defaultView.getComputedStyle(element[, pseudoElt]).display;

    getComputedStyle

    reply
    0
  • 为情所困

    为情所困2017-05-18 10:58:07

    I guess you want to get the expansion and contraction of the left menu?
    If it is Vue, you don’t need to spend so much time manipulating DOM elements, right? Just define a data control to show and hide it

    reply
    0
  • Cancelreply