Tag Archives: target

target 属性

target有5个属性,但实际的工作中我也只用到过_blank和_parent这俩个,其它的基本没有用过,今天有时间简单的测试了一下。 target的5个属性分别为: _blank 在新窗口中打开被链接文档。 _self 默认。在相同的框架中打开被链接文档。 _parent 在父框架集中打开被链接文档。 _top 在整个窗口中打开被链接文档。 framename 在指定的框架中打开被链接文档。 < !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>无标题文档</title> <style type="text/css"> body{ background:#8B7799; font:normal 12px/22px arial; color:#FFF;} </style> </head> <body> targe="_blank"在新窗口中打开被链接文档。 <a href="http://www.bai80.com" target="_blank">这是A页面</a> <br /> targe="_parent" 在父框架集中打开被链接文档。 <a href="http://www.bai80.com" target="_parent">这是A页面</a> <br /> targe="_self"默认。在相同的框架中打开被链接文档。 [...]