为什么用按钮调用函数的方法没有反应?
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>SetTimeout</title>
<script src="http://code.jquery.com/jquery-1.11.3.js"></script>
<script type="text/javascript">
$(document).ready(function fun() {
//var $div = $('div'); //jQuery对象
//var div = $div.get(0);
//div.style.color = 'red'; //操作dom对象的属性
var div = document.getElementsByTagName('div');
var $div = $(div);
var $first = $div.first();
$first.css = ('color', 'blue');
});
</script>
</head>
<body >
<div id ="id">javascript
<p>javascript</p><div id="di">jQuery</div><h5>PHP</h5></div>
<input value="button" type="button" onclick="fun()" />
<div>元素一</div>
<div>元素二</div>
<div>元素三</div>
</body>