+ 1

Write program that print message if user enter shift

1st Jul 2018, 3:03 AM
M Riaz
M Riaz - avatar
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>
1st Jul 2018, 3:18 AM
Phurinat Puekkham
Phurinat Puekkham - avatar
+ 1
in c++
1st Jul 2018, 3:21 AM
M Riaz
M Riaz - avatar
+ 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?
1st Jul 2018, 7:35 AM
E_E Mopho
E_E Mopho - avatar