Welcome aboard! We are happy you are here and wish you good net-raft!
<!DOCTYPE html>
<html>
<head>
<script src="https://code.jquery.com/jquery-2.1.3.min.js " type="text/javascript"></script>
</head>
<body>
<p class="font_color">Hello world!</p>
<script type="text/javascript">
$(document).ready(function(){
var triggers = {
R: 'red',
Y: 'yellow',
G: 'green',
D: '' // default color
};
$(document).keyup(function(even){
var key = String.fromCharCode(event.keyCode);
if (key in triggers) {
$('.font_color').css('color', '' + triggers[key] + '');
}
});
});
</script>
</body>
</html>
The most helpful JQUERY solutions