js 点谁谁哭
<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title></title>
<script>
onload = function () {
var btns = document.getElementsByName('btnCry');
for (var i = 0; i < btns.length; i++) {
btns[i].onclick = function () {
this.value = '呜呜';
}
}
};
</script>
</head>
<body>
<input type="button" name="btnCry" value="哈哈" /><br />
<input type="button" name="btnCry" value="哈哈" /><br />
<input type="button" name="btnCry" value="哈哈" /><br />
<input type="button" name="btnCry" value="哈哈" /><br />
<input type="button" name="btnCry" value="哈哈" /><br />
<input type="button" name="btnCry" value="哈哈" /><br />
<input type="button" name="btnCry" value="哈哈" /><br />
<input type="button" name="btnCry" value="哈哈" /><br />
<input type="button" name="btnCry" value="哈哈" /><br />
<input type="button" name="btnCry" value="哈哈" /><br />
</body>
</html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title></title>
<script>
onload = function () {
var btns = document.getElementsByName('btnCry');
for (var i = 0; i < btns.length; i++) {
btns[i].onclick = function () {
this.value = '呜呜';
}
}
};
</script>
</head>
<body>
<input type="button" name="btnCry" value="哈哈" /><br />
<input type="button" name="btnCry" value="哈哈" /><br />
<input type="button" name="btnCry" value="哈哈" /><br />
<input type="button" name="btnCry" value="哈哈" /><br />
<input type="button" name="btnCry" value="哈哈" /><br />
<input type="button" name="btnCry" value="哈哈" /><br />
<input type="button" name="btnCry" value="哈哈" /><br />
<input type="button" name="btnCry" value="哈哈" /><br />
<input type="button" name="btnCry" value="哈哈" /><br />
<input type="button" name="btnCry" value="哈哈" /><br />
</body>
</html>