English 中文(简体)
案文
原标题:No Text appears

我的法典:

    <script type="text/javascript">
var req = new XMLHttpRequest();
req.open("GET","http://surfkid.redio.de/link.php");
req.send(null);
document.write(req.responseText);
</script>

{
  "name": "My First Extension",
  "version": "1.0",
  "description": "The first extension that I made.",
  "browser_action": {
   "default_icon": "android.jpg",
   "popup": "link.html"
  },
  "permissions": [
    "http://surfkid.redio.de/"
  ]
}

当一行时,就没有案文。 没有人知道为什么?

最佳回答

我认为,这是因为你不再使用瞬息万变发明。 由于这一联系是同步的,在发出答复之后,答复就是无效的。

你可以这样做:

var xhr = new XMLHttpRequest();
xhr.open("GET", "http://surfkid.redio.de/link.php", true);
xhr.onreadystatechange = function() {
  if (xhr.readyState == 4) {
    document.write(xhr.responseText);
  }
}
xhr.send();
问题回答

暂无回答




相关问题
Redirect to cache URL in Chrome browser

self.location = cache: + self.location I want to redirect from "[URL]" to "cache:[URL]". I just want this code to work in Chrome browser.

我如何更新/重载 Chrome延?

I m在4号 Chrome(目前为4.0.249.0)中开发一个延伸点,显示用户在地位酒吧中的形象。 Ive设计了一个供用户使用的备选办法网页......

Setting Opacity in CSS For Chrome

I ve tried the following: (this is actually for fancybox, as the overlay does not show in chrome/safari: $("#fancy_overlay").css({<br /> background-color : opts....

Chrome Blocking Javascript, Google Wave, Google Gadgets

Project: Developing a gadget template for Google Wave which will allow my Flash movies to interact with the Wave api. I had to adapt the existing Flex application so that it would work with ...

image height using jquery in chrome problem

$( img ).height() returns 0 in chrome, but it returns the actual height in IE and firefox. Whats the actual method to get the height of the image in chrome?

jQuery block moving

I wanna move a div block to the top, so I coded like this: CSS part: .movingPart{ margin-top:80px; } jQuery part: $(document).ready(function() { $( #btn ).click(function() { $( .movingPart )....

Table cells bad rendering with Google Chrome/Webkit

On the following code, COL1A and COL3A are not 50% height with Chrome or Webkit. It works fine with IE7 and Firefox. <table border="1"> <tr> <td height="100%">COL 1A</td>...

热门标签