我想获得一个代码片段,演示如何检查选项卡是否已打开.
我需要以下功能:1.用户单击按钮添加附加选项卡2.检查是否已存在具有这些标题的选项卡3.如果已存在则选择现有选项卡否则添加新选项卡
此致,Javanus
我的页面由4个div组成:顶部是标题,中间是菜单div和内容div,底部是页脚div。
页脚应固定在屏幕底部。我希望内容 div 将从页眉 div 拉伸到页脚 div。如果我使用
position: absolute;
top: 80px;
bottom: 30px;
Run Code Online (Sandbox Code Playgroud)
然后内容被拉伸到页脚,但之后内容不会向右拉伸。请检查下面的代码。我希望红色的内容从绿色垂直延伸到黄色,从蓝色水平延伸到屏幕的右边缘。
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title><tiles:insertAttribute name="title" ignore="true" /></title>
<style>
html,body{
margin:0;
padding:0;
height:100%;
}
#javanus_header{
height: 80px;
background:#AAF054;
}
#javanus_footer{
position:absolute;
bottom:0;
width:100%;
height:30px;/* Height of the footer */
background: yellow;
}
#javanus_menu{
float: left;
position: absolute;
top: 80px;
height:200px;
width: 200px;
background: blue;
}
#javanus_content{
height: 300px;
margin-left: 200px;
background: red;
top:100px;
bottom:50px;
background-image:url(img/assist.png);
background-repeat: no-repeat;
background-position:center;
}
</style>
</head>
<body>
<div id="javanus_main"> …Run Code Online (Sandbox Code Playgroud)