HTML ͳһ×ÊÔ´¶¨Î»Æ÷(Uniform Resource Locators)
URL ÊÇÒ»¸öÍøÒ³µØÖ·¡£
URL¿ÉÒÔÓÉ×Öĸ×é³É£¬Èç"runoob.com"£¬»ò»¥ÁªÍøÐÒ飨IP£©µØÖ·£º
192.68.20.50¡£´ó¶àÊýÈ˽øÈëÍøվʹÓÃÍøÕ¾ÓòÃûÀ´·ÃÎÊ£¬ÒòΪ
Ãû×Ö±ÈÊý×Ö¸üÈÝÒ×¼Çס¡£
URL - ͳһ×ÊÔ´¶¨Î»Æ÷
Webä¯ÀÀÆ÷ͨ¹ýURL´ÓWeb·þÎñÆ÷ÇëÇóÒ³Ãæ¡£
µ±Äúµã»÷ HTML Ò³ÃæÖеÄij¸öÁ´½Óʱ£¬¶ÔÓ¦µÄ <a> ±êÇ©Ö¸ÏòÍòάÍøÉϵÄÒ»¸öµØÖ·¡£
Ò»¸öͳһ×ÊÔ´¶¨Î»Æ÷(URL) ÓÃÓÚ¶¨Î»ÍòάÍøÉϵÄÎĵµ¡£
Ò»¸öÍøÒ³µØַʵÀý:
http://www.runoob.com/html/html-tutorial.html
Óï·¨¹æÔò:
scheme://host.domain:port/path/filename
˵Ã÷:
- scheme - ¶¨ÒåÒòÌØÍø·þÎñµÄÀàÐÍ¡£×î³£¼ûµÄÀàÐÍÊÇ http
- host - ¶¨ÒåÓòÖ÷»ú£¨http µÄĬÈÏÖ÷»úÊÇ www£©
- domain - ¶¨ÒåÒòÌØÍøÓòÃû£¬±ÈÈç runoob.com
- :port - ¶¨ÒåÖ÷»úÉϵĶ˿ںţ¨http µÄĬÈ϶˿ںÅÊÇ 80£©
- path - ¶¨Òå·þÎñÆ÷ÉϵÄ·¾¶£¨Èç¹ûÊ¡ÂÔ£¬ÔòÎĵµ±ØÐëλÓÚÍøÕ¾µÄ¸ùĿ¼ÖУ©¡£
- filename - ¶¨ÒåÎĵµ/×ÊÔ´µÄÃû³Æ
³£¼ûµÄ URL Scheme
ÒÔÏÂÊÇһЩURL scheme£º
Scheme |
·ÃÎÊ |
ÓÃÓÚ... |
http |
³¬Îı¾´«ÊäÐÒé |
ÒÔ http:// ¿ªÍ·µÄÆÕͨÍøÒ³¡£²»¼ÓÃÜ¡£ |
https |
°²È«³¬Îı¾´«ÊäÐÒé |
°²È«ÍøÒ³£¬¼ÓÃÜËùÓÐÐÅÏ¢½»»»¡£ |
ftp |
Îļþ´«ÊäÐÒé |
ÓÃÓÚ½«ÎļþÏÂÔØ»òÉÏ´«ÖÁÍøÕ¾¡£ |
file |
|
Äú¼ÆËã»úÉϵÄÎļþ¡£ |
URL ×Ö·û±àÂë
URL Ö»ÄÜʹÓÃ
ASCII ×Ö·û¼¯.
À´Í¨¹ýÒòÌØÍø½øÐз¢ËÍ¡£ÓÉÓÚ URL ³£³£»á°üº¬ ASCII ¼¯ºÏÖ®ÍâµÄ×Ö·û£¬URL ±ØÐëת»»ÎªÓÐЧµÄ ASCII ¸ñʽ¡£
URL ±àÂëʹÓà "%" Æäºó¸úËæÁ½Î»µÄÊ®Áù½øÖÆÊýÀ´Ìæ»»·Ç ASCII ×Ö·û¡£
URL ²»ÄÜ°üº¬¿Õ¸ñ¡£URL ±àÂëͨ³£Ê¹Óà + À´Ìæ»»¿Õ¸ñ¡£
ÔÚÏßʵÀý
Èç¹ûÄúµã»÷ÏÂÃæµÄ"Ìá½»"°´Å¥£¬ä¯ÀÀÆ÷»áÔÚ·¢ËÍÊäÈë֮ǰ¶ÔÆä½øÐÐ URL ±àÂë¡£·þÎñÆ÷ÉϵÄÒ³Ãæ»áÏÔʾ³ö½ÓÊÕµ½µÄÊäÈë¡£
ÊÔ×ÅÊäÈëһЩ×Ö·û£¬È»ºóÔٴεã»÷Ìá½»°´Å¥¡£
URL ±àÂëʵÀý
×Ö·û |
URL ±àÂë |
€ |
%80 |
¡ê |
%A3 |
? |
%A9 |
? |
%AE |
¨¤ |
%C0 |
¨¢ |
%C1 |
? |
%C2 |
? |
%C3 |
? |
%C4 |
? |
%C5 |
ÈçÐèÍêÕûµÄ URL ±àÂë²Î¿¼£¬Çë·ÃÎÊÎÒÃÇµÄ URL ±àÂë²Î¿¼Êֲᡣ
|