日期:2014-05-16 浏览次数:20389 次
<!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>
<script language="javascript" >
function t() {
var obj = document.getElementById("select1");
var index = obj.selectedIndex;
var val = obj.options[index].text;
//var tabel = document.getElementById("tb");//变量名称错了
var table = document.getElementById("tb");
for (var i = 0; i < table.rows.length; i++) {
table.rows[i].style.display = val == table.rows[i].cells[2].innerHTML ? '' : 'none';
}
}
</script>
</head>
<body>
<div>
<label for="selectReason">原因:</label>
<select id="select1" name="selectReanson" onchange="t()">
<option>...</option>
<option>文件不一致</option>
<option>基准文件缺失</option>
<option>服务器文件缺失</option>
</select>
<table width="500" border= "1" id= "tb">
<tr>
<td> </td>
<td> </td>
<td>文件不一致</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td>基准文件缺失</td>
</tr>
<tr>