87,994
社区成员




<script src="http://code.jquery.com/jquery-latest.js"></script>
<script type="text/javascript">
$(function(){
$("table div").bind("dblclick",function(){
$(this).text($(this).text()+":"+$("#selScore").val());
})
})
</script>
<select name="selScore" id="selScore">
<option value="优秀">优秀</option>
<option value="优良">优良</option>
<option value="及格">及格</option>
<option value="不及格">不及格</option>
</select>
<div style="width:300px;height:300px">
<table width="400px" height="350px" border="1">
<tr>
<td><div id="div0101">语文</div></td>
<td><div id="div0102">数学</div></td>
</tr>
<tr>
<td><div id="div0201">英语</div></td>
<td><div id="div0202">化学</div></td>
</tr>
</table>
</div>
<select name="selScore" id="selScore">
<option value="优秀">优秀</option>
<option value="优良">优良</option>
<option value="及格">及格</option>
<option value="不及格">不及格</option>
</select>
<script>
function dblEvent(e) {
var o = e.srcElement || e.target;
o.innerHTML = o.innerHTML.split(':')[0] + ':' + document.getElementById('selScore').value;
}
</script>
<div style="width:300px;height:300px" ondblclick="dblEvent(event)">
<table width="400px" height="350px" border="1">
<tr>
<td><div id="div0101">语文</div></td>
<td><div id="div0102">数学</div></td>
</tr>
<tr>
<td><div id="div0201">英语</div></td>
<td><div id="div0202">化学</div></td>
</tr>
</table>
</div>