有关JQuery中change函数的问题
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<title></title>
<style>
.left div,
.right div {
width: 100%;
padding: 5px;
margin: 5px;
float: left;
border: 1px solid #ccc;
}
.left div {
background: #bbffaa;
}
.right div {
background: yellow;
}
</style>
<script src="http://libs.baidu.com/jquery/1.9.1/jquery.js"></script>
</head>
<body>
<h2>input、textarea与select</h2>
<div class="left">
<div class="aaron">input:
<input class="target1" type="text" value="监听input的改变" />
</div>
<div class="aaron1">select:
<select class="target2">
<option value="option1" selected="selected">Option 1</option>
<option value="option2">Option 2</option>
</select>
</div>
<div class="aaron3">textarea:
<textarea class="target2" rows="3" cols="20">多行的文本输入控件</textarea>
</div>
</div>
输出结果:
<div id="result"></div>
<script type="text/javascript">
//监听input值的改变
$('.target1').change(function(e) {
$("#result").html(e.target.value)
});
//监听select:
$(".target2").change(function(e) {
$("#result").html(e.target.value)
})
//监听textarea:
$(".target3").change(function(e) {
$("#result").html(e.target.value)
})
</script>
</body>
</html>
这里的$("#result").html(e.target.value)中为什么是e.target.value?为什么function后面的括号里面有e呢?求解答,谢谢!