带有“http://”的IP地址

时间:2015-05-14 12:37:00

标签: networking ip

我对ip地址有疑问。在ip地址前写“http://”是否正确?

示例$(".addbut").click(function(){ alert($(this).parent().attr('id')); }); // this refers to the current element // .parent() returns the nearest parent of a element<br> // you can get any attribute using .attr() method on the required element

“http://”前缀是否必须写入?

我只需要连接到局域网中的设备,但我一般都会问。如果我写入chrome它只是删除前缀,所以我想知道我是否应该在我的应用程序中。

1 个答案:

答案 0 :(得分:1)

是的,使用带有IP地址的http://。有些浏览器可以从地址栏进行搜索,当没有指定协议时,他们会假设您输入了搜索词而不是地址。

仅使用IP地址可能有效,但可能会失败。指定协议也将始终有效。

http://192.168.1.1/