I cannot get preventDefault()
to work.
Here are some different code variations I have tried:
First:
$(document).keyup(function (evt)
see working example here http://jsfiddle.net/WGSvm/
In all three examples you have used
$(document).keyup(function (evt) { });
I would say use particular div id instead of $(document).keyup(function (evt) { });
like $("#DivIdName").keyup(function (evt) { });
and also use onkeypress
strictly, because if you use onkeyup
it has already executed its default task of printing or whatever it is.