+ 1
Write program that print message if user enter shift
3 Antworten
+ 2
What language ?
if using Javascript, try this.
<p id="message"></p>
<script>
var message = document.querySelector('#message');
document.addEventListener("keyup", function(event) {
event.preventDefault();
if (event.keyCode === 16) {
message.innerHTML = "message";
}
});
</script>
+ 1
in c++
+ 1
could u be more clearer M Riaz
if a user enters the word "shift" as an input or hits the shift key ?
and what message should be printed?