Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- window.onkeydown = function (num) {
- if ( Screen_total.length < '15' ) {
- if ( keys[num.keyCode] == 'backspace' ) {
- Screen_total = Screen_total/10;
- Screen_total = Screen_total - (Screen_total%1);
- toScreen(Screen_total);
- console.log('Длина:' + Screen_total.length);
- } else {
- console.log(keys[num.keyCode] + ' (клавой)');
- if ( Screen_total != '' ) {
- Screen_total = Screen_total + keys[num.keyCode];
- } else {
- Screen_total = keys[num.keyCode];
- }
- console.log('Длина: ' + Screen_total.length);
- toScreen(Screen_total);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement