Fixed bug that get the correct keycode value in IE6-8

Fixed bug that get the correct keycode value in IE6-8
Fixed bug that preventing “SCRIPT5: Access is denied” error in IE