Zhang Xiaoxiang: JavaScript Tutorial notes: HTML Basics (iii)-url, image labels, image maps

Source: Internet
Author: User
Tags character set parent directory relative resource client access root directory
HTML Basics |javascript| Notes | tutorials

  Url

If the FTP server is using the default port 23, it is also like HTTP for 801, do not write;

The URL is case sensitive;

If the base URL is not explicitly set, the relative URL uses the directory path of the current page as the base URL;

/represents the root directory; ..  /represents the parent directory of the current directory; ./represents the current directory;

The advantage of relative URLs is that when you move pages and resources to another server,
If you use an absolute URL, you have to make changes to all URLs, and the relative URL can
Ensure that the URL of a Web page's request to a resource does not need to be changed, as long as it guarantees their relative file-system relationships;

Passing of parameters:
The value of the Name=zhangsan&password=fuck parameter can be null;

Anchor tag:
Http://www.cao.org/index.html#section2, the same as the effect of the anchor defined by the name attribute in href;

URL encoding:

Methods for URL-encoded classes in Java:

Urlencode.encode (String s,string character set) throws Unsupportedencodingexception

Rules:

Converts a space to +
The 0-9,a-z,a-z characters are unchanged;
Other:% plus current characters in hexadecimal format in the current character set memory;
Description
If you can be sure that the special characters of the URL string do not cause ambiguity or conflict in use,
Can not encode: http://www.sohu.com/index.html?name= China
The protocol and permission portions of the URL generally do not need to encode;

mailto url:mailto:format_jade@163.com?subect=feedback&body=how%20areyou!

CC: The recipient can see that you have sent the same message to someone else;

Some software for convenience, is not to comply with the standard;

  Image label

Properties of :
ALT: The hint displayed above the image when the property is moved to the image
text; When the image cannot be loaded, the prompt is displayed where the image should appear;
Align
Border
Width
Height
Request XXX data to the Web server; Note that this xxx is a URL, it is not necessarily an image
File name, anyway is the request for XXX, that this XXX can also be a JSP and the like program;
It is no problem to return an image or draw an image from this JSP program Oh!

  Image map

Image hyperlink: <a href= "url" ></a> is to use the image as a link to the hint rather than text;

Shit, not, if the use of proxy Internet, can not use localhost access to the machine and only through the 127.0.0.1;
Visible, localhost and 127.0.0.1 access path must not be the same;
Visible, browser options in the "Local not use agent" is directly targeted at the localhost;

Divided into server-side image map and client image map;

Client image Map

1, Image hotspot mapping: <map name=mapname></map>
2,<area Shape=xingzhuang Coords=zuobiao href=url> If the href is replaced with nohref;
<area> target indicates in which 2 window or frame the browser displays the page resource that the href attribute points to;
3,<image usemap= "#mapname" >;

Example:


<map name= "Mymap" >
<area shape= "rect" coords= "0,0,50,50" href= "http://www.sohu.com" ></area>
<area shape= "rect" coords= "50,0,100,50" href= "http://www.baidu.com" ></area>
<area shape= "rect" coords= "100,0,150,50" href= "http://www.163.com" ></area>
</map>
*********
Shape=rect/poly/circle



Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.