[示例代码]
<html>
<head>
<script src="jquery-1.2.js"></script>
<script>
$(document).ready(
function () {
$("#form :text").each(
function (index, element) {
$(element).css("background-color", "yellow");
}
);
}
);
</script>
</head>
<body>
<form id="form">
<input type="input" />
<input type="input" />
<input type="input" />
<input type="submit" />
</form>
</body>
</html>
时间: 2024-10-15 20:48:38