Detailed explanation of base href usage_Basic tutorial base href usage

PHP中文网
Release: 2016-05-16 12:06:47
Original
2704 people have browsed it

it is often used in frame structures, such as the left and right frames. all the connections in the files in the left frame are displayed in the right frame. just use the base tag and write its target attribute value as the name of the right frame. this eliminates the need to specify the target attribute for each connection in the file in the left frame.

other instructions for base href tags:
1. when used, the base element must appear in the head of the document, before any reference to external sources.
2. this element is available in html of microsoft® internet explorer 3.0 and in scripts of internet explorer 4.0.
3. this element will not be rendered. ​
4. this element does not require a closing tag.
5. the base tag is actually useful. for example, will cause all the links on this page to open in a new page, so there is no need to add target="_blank" at each link. .

note in ie7:
1. no additional output characters can be added before . otherwise, ie7 will not parse base.
2. is a link base mark, used to change the default parameter values ​​of all link marks in the file. it can only be adapted to the beginning of the file, that is, between the tags and .

<html>   
<head>   
<base href=http://www.php.cn target="_blank">   
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">   
<title>base href用法</title>   
</head>   
<body>   
<a href="1.php">1.asp</a>   
<a href="2.php">2.asp</a>   
</body>   
</html>
Copy after login
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template