button style

<HTML>
<HEAD>
<style>
.btn {
 BORDER-RIGHT: #7b9ebd 1px solid; PADDING-RIGHT: 2px; BORDER-TOP: #7b9ebd 1px solid; PADDING-LEFT: 2px; FONT-SIZE: 12px; FILTER: progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr=#ffffff, EndColorStr=#cecfde); BORDER-LEFT: #7b9ebd 1px solid; CURSOR: hand; COLOR: black; PADDING-TOP: 2px; BORDER-BOTTOM: #7b9ebd 1px solid
}
.btn1 {
 BORDER-RIGHT: #7b9ebd 1px solid; PADDING-RIGHT: 2px; BORDER-TOP: #7b9ebd 1px solid; PADDING-LEFT: 2px; FONT-SIZE: 12px; FILTER: progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr=#ffffff, EndColorStr=#cecfde); BORDER-LEFT: #7b9ebd 1px solid;COLOR: black; PADDING-TOP: 2px; BORDER-BOTTOM: #7b9ebd 1px solid
}
</style>
<script language="JavaScript">
var num = 0;
//insert a row
function addRow()
{
var dataBox = document.getElementById("dataBox");
var otr = dataBox.insertRow(dataBox.rows.length);
var otd = otr.insertCell();
otd.height = "25";
num = num + 1
var sHTML = "<input type='file' name='file"+num+"' SIZE='40' style='border:1px solid #eeeeee; background-color:#eeeeee'>"
otd.innerHTML = sHTML;

}
//delete a row
function delrow()
{
var i = 0,otr;
var dataBox = document.getElementById("databox");
  i=num;
 if(num!=0){
  otr = dataBox.deleteRow(i);
     num--;
  }
}
function check(){
 var file=document.FORM.file0.value;
 if(file==""){
  alert("please select upload file!");
  return false;
  }
}
</script>
</HEAD>
<BODY BGCOLOR="white">
<FORM NAME="FORM" METHOD="POST" ACTION="upload.jsp" ENCTYPE="multipart/form-data" onsubmit="return check()">
<table>
<tr><td>
<button name="btnAddRow" onclick="addRow()" class = "btn">Add Row</button>
</td><td>
<button name="btnDeleteRow" onclick="delrow()" class = "btn">Delete Row</button>
</td></tr>
</table>
<table width="80%" id="dataBox" class="tblBillDetail" cellspacing="0" cellpadding="0" height="0" border="0">
<tr><td><input type='file' name='file0' SIZE='40' style='border:1px solid #eeeeee; background-color:#eeeeee'></td></tr>
</table>
<table>
<tr><td>
<INPUT class = "btn" TYPE="SUBMIT" VALUE="Upload">
<p class = "btn1">Max Files Size :10000(KB)<br>Allowed upload :jpg,gif,txt,pdf,doc,xls</p>
</td></tr>
</table>
</FORM>
</BODY>
</HTML>

posted on 2006-10-20 11:58 leoli 阅读(377) 评论(0)  编辑  收藏 所属分类: html


只有注册用户登录后才能发表评论。


网站导航:
 

导航

<2024年12月>
24252627282930
1234567
891011121314
15161718192021
22232425262728
2930311234

统计

常用链接

留言簿(6)

随笔分类

随笔档案(17)

文章分类(86)

收藏夹(3)

flex blog

good site

java blog

my friend

tools

抓虾

搜索

最新评论

阅读排行榜

评论排行榜