日期:2014-05-20 浏览次数:20808 次
<html>
<head>
</head>
<body>
<table border="0" bgcolor="#00FF0f">
<tr>
<th>姓名</th>
<th>想干嘛</th>
</tr>
<tr>
<td><select>
<option value="love" >zdd</option>
<option value="work" >zxw</option>
</select></td>
</tr>
<tr>
<!--这里还没写,问题就在这里-->
</tr>
</table>
</body>
</html>
<html>
<head>
<script type="text/javascript">
function display(sel){
var tdshow = document.getElementById("content");
if(sel.value=="love"){
tdshow.innerText="爱";
}else{
tdshow.innerText="工作";
}
}
</script>
</head>
<body>
<table border="0" bgcolor="#00FF0f">
<tr>
<th>姓名</th>
<th>想干嘛</th>
</tr>
<tr>
<td><select onchange="display(this)">
<option value="love" selected="selected">zdd</option>
<option value="work" >zxw</option>
</select></td>
<td id="content">爱
<td>
</tr>
</table>
</body>
</html>