<head>
<script src="js/jquery/1.11.3/jquery.min.js"></script>
</head>
<body>
<form>
<input id="id-fname" type="text" value="">
</form>
<script>
$("#id-fname").keyup(function() {
$("#id-fname").val('You just triggered keyup: ');
});
</script></body>
</html>