Posted on 2008-08-14 12:58
☆ 阅读(113)
评论(0) 编辑 收藏 所属分类:
CSS样式表
CSS基础知识:
在网页中引入样式表
<link rel="stylesheet" href="style/common/Main.css" type="text/css">
让一个文本框只留一条下划线
<input type="text" name="keyWord" size="10" value="<bsst:param name="keyWord"/>" class="input_line">
INPUT.input_line
{
border-bottom-width: 1px;
border-bottom-style: solid;
border-bottom-color: #000000;
border-top-width: 0px;
border-right-width: 0px;
border-left-width: 0px;
}
元素隐藏
<div id="div2" style="display: none">
<input type="image" id="" src="0302.JPG" onclick="nn();">
</div>
在javascript中也可以设置成
var div1 = document.getElementById("div1");
var div2 = document.getElementById("div2");
div1.style.display="none"; //隐藏
div2.style.display="block"; //显示
线形设置
var tab = document.getElementById("table1");
var newTr3 = tab.insertRow(-1);
var newTd0 = newTr3.insertCell();
var newTd1 = newTr3.insertCell();
newTd0.style.border = "1px dotted black";
newTd1.style.border = "1px dotted black";//设置为黑色实心线宽度为1
newTd0.innerText='Peter';
newTd1.innerText ='总经办';
table设置
TABLE.table1
{
border-top:rgb(0,128,192) 1px solid;
border-left:rgb(0,128,192) 1px solid ;
}
TABLE.table1 td
{
border-bottom:rgb(0,128,192) 1px solid ;
border-right:rgb(0,128,192) 1px solid ;
}