search

Home  >  Q&A  >  body text

vue.js - Can javascript determine whether a file exists? ? ?

I want to know if javascript can determine whether a file exists based on its address path?
I made a vue dynamic menu. I want to check whether the component component file exists. If it does not exist, I will continue to go out without pushing the route. Is there any way to tell? Not through node, just vue javascript

为情所困为情所困2748 days ago1745

reply all(5)I'll reply

  • PHP中文网

    PHP中文网2017-05-19 10:44:38

    H5 fileReader

    reply
    0
  • 漂亮男人

    漂亮男人2017-05-19 10:44:38

    For security reasons, this is not allowed. Otherwise, wouldn’t you feel terrible if your files could be manipulated when you open a web page? ?

    reply
    0
  • 習慣沉默

    習慣沉默2017-05-19 10:44:38

    How do you read files without going through node?

    reply
    0
  • PHP中文网

    PHP中文网2017-05-19 10:44:38

    You need to use node to read the file, the api has

    reply
    0
  • 習慣沉默

    習慣沉默2017-05-19 10:44:38

    Can I send a request to the backend?

    reply
    0
  • Cancelreply