HTML »ù´¡½Ì³Ì

HTML ýÌå

HTML ²Î¿¼ÊÖ²á

HTML5 »ù´¡½Ì³Ì

HTML5 API

HTML5 ýÌå

HTML URL

URL£ºUniform Resource Locators£¨Í³Ò»×ÊÔ´¶¨Î»Æ÷£©µÄ¼òд£¬Webä¯ÀÀÆ÷ͨ¹ýURL´ÓWeb·þÎñÆ÷ÇëÇóÒ³Ãæ¡£ url²»ÊÇÊôÐÔ£¬srcºÍhrefÊÇÊôÐÔ£¬srcÓÃÓÚÌæ»»µ±Ç°ÔªËØ£¬hrefÓÃÓÚÔÚµ±Ç°ÎĵµºÍÒýÓÃ×ÊÔ´Ö®¼äÈ·Á¢ÁªÏµ£¬Ò²¾ÍÊÇ˵srcÒýÓõÄ·¾¶ÊÇimgµÈÒª¼ÓÔصÄ·¾¶£¬hrefÒýÓõÄ·¾¶ÊÇÒªÌøתµ½µÄµØ·½¡£

HTML  Í³Ò»×ÊÔ´¶¨Î»Æ÷(Uniform Resource Locators)

URL ÊÇÒ»¸öÍøÒ³µØÖ·¡£

URL¿ÉÒÔÓÉ×Öĸ×é³É£¬Èç"www.xxs100.com"£¬»ò»¥ÁªÍøЭÒ飨IP£©µØÖ·£º 192.168.1.10¡£´ó¶àÊýÈ˽øÈëÍøվʹÓÃÍøÕ¾ÓòÃûÀ´·ÃÎÊ£¬ÒòΪ Ãû×Ö±ÈÊý×Ö¸üÈÝÒ×¼Çס¡£

URL - ͳһ×ÊÔ´¶¨Î»Æ÷

Webä¯ÀÀÆ÷ͨ¹ýURL´ÓWeb·þÎñÆ÷ÇëÇóÒ³Ãæ¡£

µ±Äúµã»÷ HTML Ò³ÃæÖеÄij¸öÁ´½Óʱ£¬¶ÔÓ¦µÄ <a> ±êÇ©Ö¸ÏòÍòάÍøÉϵÄÒ»¸öµØÖ·¡£

Ò»¸öͳһ×ÊÔ´¶¨Î»Æ÷(URL) ÓÃÓÚ¶¨Î»ÍòάÍøÉϵÄÎĵµ¡£

Ò»¸öÍøÒ³µØַʾÀý:Óï·¨¹æÔò:

scheme://host.domain:port/path/filename

˵Ã÷:

    • scheme - ¶¨ÒåÒòÌØÍø·þÎñµÄÀàÐÍ¡£×î³£¼ûµÄÀàÐÍÊÇ http

    • host - ¶¨ÒåÓòÖ÷»ú£¨http µÄĬÈÏÖ÷»úÊÇ www£©

    • domain - ¶¨ÒåÒòÌØÍøÓòÃû£¬±ÈÈç xxs100.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 ±àÂëͨ³£Ê¹Óà + À´Ìæ»»¿Õ¸ñ¡£

HTMLÖÐurl¡¢scr¡¢hrefµÄÇø±ð

  • url²»ÊÇÊôÐÔ£¬srcºÍhrefÊÇÊôÐÔ£¬srcÓÃÓÚÌæ»»µ±Ç°ÔªËØ£¬hrefÓÃÓÚÔÚµ±Ç°ÎĵµºÍÒýÓÃ×ÊÔ´Ö®¼äÈ·Á¢ÁªÏµ£¬Ò²¾ÍÊÇ˵srcÒýÓõÄ·¾¶ÊÇimgµÈÒª¼ÓÔصÄ·¾¶£¬hrefÒýÓõÄ·¾¶ÊÇÒªÌøתµ½µÄµØ·½¡£

  • srcÊÇsourceµÄ¼òд£¬±íʾµÄÊÇÒýÈëÎļþ£¬Ä¿µÄÊÇÒª°ÑÎļþ¼ÓÔص½htmlÒ³ÃæÖÐÈ¥£¬µ±ä¯ÀÀÆ÷½âÎöµÄʱºò»áÔÝÍ£ÆäËûµÄÄÚÈݶø»áÏȼÓÔØsrcÄÚÈÝ£¬±ØÐëÒªµÈµ½srcµÄÄÚÈݼÓÔØÍê³ÉÖ®ºó²Å»áÖ´ÐкóÃæ¡££¨³£ÓõÄÓУºimg¡¢script¡¢iframe£©

  • hrefÊÇHypertext ReferenceµÄ¼òд£¬±íʾµÄʱ³¬Îı¾ÒýÓã¬Ö¸ÏòÍøÂç×ÊÔ´ËùÔÚλÖ㬽¨Á¢ºÍµ±Ç°ÔªËØ£¨Ãªµã£©»òµ±Ç°Îĵµ£¨Á´½Ó£©Ö®¼äµÄÁ´½Ó£¬ËüÓëÒ³ÃæÖ±½ÓµÄ¹ØϵΪÁ´½ÓµÄ¹Øϵ£¬ÔÚ¼ÓÔØËüµÄʱºòÒ³Ãæ±¾ÉíÒ²²»»áÍ£Ö¹ÆäËûÄÚÈݵļÓÔØ¡£ÓÃÀ´½¨Á¢µ±Ç°ÔªËغÍÎĵµÖ®¼äµÄÁ´½Ó¡££¨³£ÓõÄÓУºlink¡¢a£©

URL ±àÂëʾÀý

×Ö·ûURL ±àÂë
%80
¡ê%A3
?%A9
?%AE
¨¤%C0
¨¢%C1
?%C2
?%C3
?%C4
?%C5

ÈçÐèÍêÕûµÄ URL ±àÂë²Î¿¼£¬Çë·ÃÎÊÎÒÃÇµÄ URL ±àÂë²Î¿¼Êֲᡣ