Advertisement
Guest User

Untitled

a guest
Jun 24th, 2019
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. window.onkeydown = function (num) {
  2. if ( Screen_total.length < '15' ) {
  3. if ( keys[num.keyCode] == 'backspace' ) {
  4. Screen_total = Screen_total/10;
  5. Screen_total = Screen_total - (Screen_total%1);
  6. toScreen(Screen_total);
  7. console.log('Длина:' + Screen_total.length);
  8. } else {
  9. console.log(keys[num.keyCode] + ' (клавой)');
  10. if ( Screen_total != '' ) {
  11. Screen_total = Screen_total + keys[num.keyCode];
  12. } else {
  13. Screen_total = keys[num.keyCode];
  14. }
  15. console.log('Длина: ' + Screen_total.length);
  16. toScreen(Screen_total);
  17. }
  18. }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement