由于在XHTML1.0过渡型标准之前,target="_blank"属性一直是点击链接后弹出新窗口的方法,但是XHTML1.0严格型标准以及XHTML1.1之后就不再支持target属性,
也就是说不能再用target="_blank"来弹出一个新的窗口!本实例探讨的是在XHTML1.1标准下弹出新窗口的方法,并结合Cookies实现客户端自定义弹出新窗口的方法。
以下是引用片段:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>自定义打开链接的方式</title>
<style type="text/CSS">
<!--
#main {
width: 600px;
margin-right: auto;
margin-left: auto;
border: 1px solid #006699;
height: 600px;
}
#title {
background-color: #006699;
padding: 10px;
width: 100%;
font-family: Verdana, Arial;
font-size: 16px;
color: #FFFFFF;
font-weight: bold;
}
#PRoperty {
margin: 10px;
border: 1px solid #99CC00;
height: 24px;
background-color: #F8FEE9;
font-size: 12px;
line-height: 24px;
}
#link {
margin: 10px;
border: 1px solid #0099CC;
background-color: #EFEEFF;
font-size: 12px;
height: 366px;
padding: 20px;
}
#copyright {
font-size: 12px;
padding: 20px;
color: #003333;
line-height: 16px;
}
img{
border-top-style: none;
border-right-style: none;
border-bottom-style: none;
border-left-style: none;
}
.center {
text-align: center;
}
-->
</style>
<script type="text/javascript">
<!--
function onlinks(){
ASP.NET为存储per-request用户状态、Session以及per-application状态、Application和Cache提供了极大的便利。不过,如果我们还需要支持除这些以外的其他情况(比如说per-request组数据)时,该怎么做?
网站建设编码中ASP.NET为存储per-request用户状态、Session以及per-application状态、Application和Cache提供了极大的便利。不过,如果我们还需要支持除这些以外的其他情况(比如说per-request组数据)时,该怎么做?许多站点根据请求方的标识来实现站点个性化的。但是,如果我们不想专门针对单个的用户,而是想把具有共同特征的用户编成一组,然后在组设定的基础上提供个性化服务,这时该怎么去做呢?比如,如果我们想要把我们的用户分成Cold、Silver以及Bronze这三组,而且让Gold客户有权访问Gold客户的共同状态,同时拒绝另外两组的访问。类似地,我们只让Silver用户看到自己的数据。