jquery样式操作
<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title></title>
<script src="jquery-1.7.1.min.js"></script>
<script>
$(function () {
//$('#btn').css({ 'fontSize': '30px', 'background-color': 'red' });
$('#btn').css('fontSize', '30px').css('background-color', 'red');
});
</script>
</head>
<body>
<input type="button" name="name" value="hello" id="btn"/>
</body>
</html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title></title>
<script src="jquery-1.7.1.min.js"></script>
<script>
$(function () {
//$('#btn').css({ 'fontSize': '30px', 'background-color': 'red' });
$('#btn').css('fontSize', '30px').css('background-color', 'red');
});
</script>
</head>
<body>
<input type="button" name="name" value="hello" id="btn"/>
</body>
</html>