search

Home  >  Q&A  >  body text

javascript - Why does the output 1 disappear immediately when the Google console outputs 1?


can also output 1, but 1 will be gone soon

天蓬老师天蓬老师2762 days ago795

reply all(4)I'll reply

  • 阿神

    阿神2017-06-30 09:54:27

    According to your description, it is probably because after clicking .navList, it jumps to other pages or refreshes the current page. If the page is reloaded, the log printed by console.log() on the previous page will be cleared. If you want to keep the log of the previous page, please check Preserve Log in the console.

    Take Chrome as an example. The new version of Chrome needs to be opened from the right and then checked (as shown in the picture). The old version is directly on the control bar.

    reply
    0
  • 过去多啦不再A梦

    过去多啦不再A梦2017-06-30 09:54:27

    [√] Preserve log

    reply
    0
  • 某草草

    某草草2017-06-30 09:54:27

    Like the picture on the second floor, check “Preserve log” to preserve the request log

    reply
    0
  • 淡淡烟草味

    淡淡烟草味2017-06-30 09:54:27

    Thank you everyone, everything you said is right. I did not prohibit the jump of connection a, so I refreshed the page

    reply
    0
  • Cancelreply