老大,你传ID的名字怎么不带引号呀
这样就好了
<html>
<head>
<title>test</title>
</head><script language="javascript"> function showplay(obj)
{
document.getElementById(obj).parentNode.style.display="block";
document.getElementById(obj).innerHTML="正在载入程序......";
} function closeplay(obj)
{
document.getElementById(obj).parentNode.style.display="none";
}</script>
<body>
<form name="form1">
<table align="center">
<tr>
<td>zzzzzzzzzzzzzzzzzzzz</td>
<td>ssssssssssssssssssss</td>
</tr>
<tr style="display:none">
<td id="abc">ffffffffffffffffffff</td>
<td>hhhhhhhhhhhhhhhhhhhh</td>
</tr>
<tr>
<td>cccccccccccccccccccc</td>
<td>bbbbbbbbbbbbbbbbbbbb</td>
</tr>
<tr align="center">
<td><input type="button" value="显示" name="buttom1" onClick="showplay('abc')"></td>
<td><input type="button" value="隐藏" name="buttom2" onClick="closeplay('abc')"></td>
</tr>
</table>
</form>
</body>
</html>
这样就好了
<html>
<head>
<title>test</title>
</head><script language="javascript"> function showplay(obj)
{
document.getElementById(obj).parentNode.style.display="block";
document.getElementById(obj).innerHTML="正在载入程序......";
} function closeplay(obj)
{
document.getElementById(obj).parentNode.style.display="none";
}</script>
<body>
<form name="form1">
<table align="center">
<tr>
<td>zzzzzzzzzzzzzzzzzzzz</td>
<td>ssssssssssssssssssss</td>
</tr>
<tr style="display:none">
<td id="abc">ffffffffffffffffffff</td>
<td>hhhhhhhhhhhhhhhhhhhh</td>
</tr>
<tr>
<td>cccccccccccccccccccc</td>
<td>bbbbbbbbbbbbbbbbbbbb</td>
</tr>
<tr align="center">
<td><input type="button" value="显示" name="buttom1" onClick="showplay('abc')"></td>
<td><input type="button" value="隐藏" name="buttom2" onClick="closeplay('abc')"></td>
</tr>
</table>
</form>
</body>
</html>
<tr align="center">
<td><input type="button" value="显示" name="buttom1" onClick="showplay('abc')"></td>
<td><input type="button" value="隐藏" name="buttom2" onClick="closeplay('abc')"></td>
</tr>