<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>each</title>
<script src="../../file/jquery-1.4.2.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function() {
$(":button:not(#btn)").each(function() {
$(this).click(function() {
alert($(this).val());
});
});
});
function clo() {
window.opener = null;
window.open('', '_self', '');
window.close();
}
</script>
</head>
<body>
<input type="button" id="b1" value="火箭队" />
<input type="button" id="b2" value="热火队" />
<input type="button" id="b3" value="太阳队" />
<input type="button" id="b4" value="凯尔特队" /> <br /><br />
<input type="button" id="btn" οnclick="clo();" value="关闭" />
</body>
</html>