As others have mentioned, make sure you're using $(document).ready() - http://api.jquery.com/ready/. Also, instead of replacing commas on keyup, you should disallow them on keypress by returning false:
$(document.ready(function () {
$("input[type=text]").keypress(function (evt) {
if (String.fromCharCode(evt.which) == ",")
return false;
});
});
Example: http://jsfiddle.net/QshDd/
This gives a more professional feel, the "," is blocked without appearing and then disappearing when you release the key. Like your solution, however, this won't catch copying and pasting commas into your input. For that, you can hook into the onpaste or onchange event.
If you want to stick with keyup and replace, you don't really need to mess around with jQuery wrappings, you can access the value property directly:
$(document.ready(function () {
$("input[type=text]").keyup(function (evt) {
this.value = this.value.replace(/,/g, "");
});
});