为什么onclick @ VM11277:1出现在错误日志中?

时间:2016-05-17 08:58:49

标签: javascript error-handling onclick virtual-machine onclicklistener

在查看我的网站时,在Chrome中的控制台调试日志中我看到了:

GET menu-system.js:13
http://www.orderofthemouse.co.uk/templates/story/pt2/TalkDeer4.html 404 (Not Found) 
loadDoc @ menu-system.js:13 
menuClicked @ menu-system.js:18
onclick @ VM11277:1

这很好,因为它只是我尚未编写的故事的一部分,我需要做的就是为它设置一个404错误处理程序*。但我想知道的是VM11277:1可能来自哪里。

完整的menu-system.js如下:

<!-- Function to load in info from different docs -->

function loadDoc(UrlString, onTemplateLoaded) {
  var xhttp = new XMLHttpRequest();
  xhttp.onreadystatechange = function() {
    if (xhttp.readyState == 4 && xhttp.status == 200) {
      document.getElementById("storybox").innerHTML = xhttp.responseText;
      if (onTemplateLoaded) onTemplateLoaded();
    };
  };
  console.log("URL = " + UrlString);
  xhttp.open("GET", UrlString, true);
  xhttp.send();
};

<!-- Check which menu button was clicked and create the correct page for each button -->
function menuClicked(UrlString)  {
  loadDoc("/templates/" + UrlString);
};

调用JavaScript的模板:

<p>You are afraid because you are now much smaller. A million tiny particles arrange 
themselves before your eyes. You see visions of terror which exists in an alternative 
multiverse. You see the rapture and experience the full horror, but you do not yet know
how to fix it. When you return to a more normal reality Deer-Wolf is standing over you 
laughing, wearing a mask, perfectly fitted to her own features but itself somehow
altered. You are again standing in the same room you were in before, but this time 
Rabbit-Cat, Pirate-Weasel and THE WIZARD are also present. Your face feels bruised but when
you touch it you do not feel the bruise. All around you charges akin to static electricity
lowe and moan in unholy harmony. You try to scream but your mouth will not open; it has
been sewn shut. The room is flying through the air and there are no-longer any walls. You 
die several times then arrive at a castle.</p>
<p>The castle is hollow at both ends and there are no wings on the butterfly flapping 
visibly before your eyes. The wings are being ripped off by an unnamed creature which 
assaults you sonically whenever you attempt to move. You must escape.</p>
<button type='button' class='btn btn-success' id='continuebtn'
onclick='menuClicked("story/pt2/TalkDeer4.html")'>Transition to Visual Section</button></p>

为什么代码创建和/或访问虚拟机,如果这确实是它在做什么?

*处理缺失故事部分的旧方法在主要重构后被删除

0 个答案:

没有答案