Since you're using JQuery, why not:
PHP Code:
<script>
$(document).ready(function(){
$("input").val("value");
$("input").change(function() {
alert("changed");
});
});
</script>
</head>
<body>
<input type="text" id="text1"/>
</body>
Working example:
http://jsfiddle.net/96gXw/