<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
<link rel="stylesheet" href="style.css" />
<script src="jquery-1.8.3.min.js"></script>
<script>
$(function () {
$("input[type!= 'text']").addClass("blue");
$("input[type$='n'][value='按钮']").addClass("green");
$("input[type='button']").addClass("red");
$("input[type^='b']").addClass("yellow");
$("input[type*='o']").addClass("blue");
$("input[type$='n']").addClass("red");
})
</script>
</head>
<body>
<input type="text" /><br />
<input type="password" /><br />
<input type="checkbox" /><br />
<input type="button" value="按钮" /><br />
</body>
</html>