[英]get html from webpage using IPv6 address and javascript
I was wondering if there was a way to use JavaScript to get a httpGet request from a IPv6 address. 我想知道是否有办法使用JavaScript从IPv6地址获取httpGet请求。
I've set up a virtual mesh network using cooja on my home computer, each node has an IPv6 address in the form of aaaa::0212:740x:000x:0x0x
where x is the node number. 我在家用计算机上使用cooja建立了一个虚拟网状网络,每个节点都有一个以
aaaa::0212:740x:000x:0x0x
形式的IPv6地址,其中x是节点号。
When using a normal jquery request: 使用普通的jquery请求时:
$.ajax({ url: url,
success: function(data)
{console.log(data); }
});
a website eg http://www.random.org/intergers/?etc , will get a random number back and log it, however when a ipv6 address is put in ie [aaaa::0212:740x:000x:0x0x] it doesnt give me back anything, no errors, no response, nothing. 一个网站,例如http://www.random.org/intergers/?etc ,将获得一个随机数并记录下来,但是当输入一个ipv6地址,即[aaaa :: 0212:740x:000x:0x0x]时并没有给我任何回报,没有错误,没有反应,没有。
Can anybody shed some light on this issue? 任何人都可以对这个问题有所了解吗?
The correct syntax for a URL containing an IPv6 address is: 包含IPv6地址的URL的正确语法是:
http://[2607:f8b0:4005:802::1010]/
The brackets are necessary to distinguish address components from a port number. 括号是区分地址组件和端口号所必需的。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.