<html>
<head><script type="text/javascript" src="jquery-1.7.2.min.js"></script></head>
<body>
<div id="div_1">
<input type="text" id="txt1" name="txtt" value="111"/>
<label id="sumv">5.00</label>
</div>
<div id="div_3">
<input type="text" id="txt2" name="txtt" value="222"/>
<label id="sumv" name="sumv_3">10.00</label>
</div>
<input type="button" value="BUTTON" οnclick="test1();"/>
<input type="button" value="BUTTON2" οnclick="test2();"/>
</body>
<script language="javascript">
function test1() {
alert($("#div_1 #sumv").text());
}
function test2() {
alert($("#div_3 label[id='sumv']").text());//firefox和IE下都有值
alert($("#div_3 #sumv").text());//firefox下有值
}
</script>
</html>
点击BUTTON2时,用firefox就可以出#sumv的值10,但在IE下,就不能,必须用