base标签的作用就是,当页面中的a超链接标签没有设置href属性的值和没有设置target属性的值时,默认使用base标签中的href属性的值和target属性的值!
直接上代码!
<!doctype html> <html> <head> <meta charset="utf-8"> <title>base标签</title> <link rel="stylesheet" type="text/css" media="all"> <link rel="stylesheet" type="text/css" <base <base target="_blank"> </head> <body> <p align="center"> <h2>base标签</h2> base标签的作用就是,当页面中的a超链接标签没有设置href属性的值和没有设置target属性的值时,默认使用base标签中的href属 性的值和target属性的值<br><br> <a <a <a <a <a target="_self">测试5</a><br><br> <a </p> </body> </html>