<!DOCTYPE html>
<html>
<head>
<title>jQuery change() method</title>
<script src="jquery-latest.min.js"></script>
<script>
$(document).ready(function(){
$("button").click(function(){
$("input").change();
});
$("input").change(function(){
$value = $(this).val()
$(this).css("background-color", "#81fb81");
$('span').text($value);
});
});
</script>
</head>
<body>
<div>
Name: <input type="text" name="name" />
<br /><br />
<button class="btn1">Change event</button>
</div>
<p>New Value: <span></span></p>
</body>
</html>