0

I wrote a image upload with jQuery, the code like this:

code

After the image is uploaded, it enters the onComplete function, but the code throws a exception.The following is the exception:

enter image description here

And I click the VM1413:1, and the following is the code:

{"msg":"success!","code":0,"data":"a image url"}#yddContainer{display:block;font-family:Microsoft YaHei;position:relative;width:100%;height:100%;top:-4px;left:-4px;font-size:12px;border:1px solid}

And I find {"msg":"success!","code":0,"data":"a image url"}is the ajax response.

And #yddContainer{display:block;font-family:Microsoft YaHei;position:relative;width:100%;height:100%;top:-4px;left:-4px;font-size:12px;border:1px solid}, this CSS is for one chrome extension.

So I have some questions:

  • Why is the exception code thrown in the VM?
  • Why the ajax repsonse appears in the VM?
  • Why the chrome extension CSS appears in the VM? And Why they are mixed?
Govind Samrow
  • 9,981
  • 13
  • 53
  • 90
yzfdjzwl
  • 117
  • 1
  • 3
  • 2
    Probably because the extension intercepts requests and manipulates them …? Adding stuff to HTML resources to show additional content/functionality inside of visited pages would be kinda understandable; but if it does so for other types of resources as well, of course that’s gonna cause trouble. Question remains, whether that is actually the extensions fault - or maybe that of your own system? If it were to respond with JSON data, but does so under a wrong Content-Type, the extension would be rather less at fault. – CBroe Jul 04 '18 at 07:12
  • @CBroe I think your guess is right, I find the ajax response contentType is `text/html`, maybe the extension add the css to the file if it's `text/html` type. Thank you much, but I want to know why they are in `VM`, I don't understant the meaning of `VM`. – yzfdjzwl Jul 04 '18 at 08:53
  • See here for what the `VM` thing means: https://stackoverflow.com/a/17373477/1427878 – CBroe Jul 04 '18 at 09:04
  • @CBroe Thanks again. – yzfdjzwl Jul 04 '18 at 09:56

0 Answers0