Abhijit  Patil

Abhijit Patil

  • NA
  • 3.8k
  • 1.6m

how to pass javascript return variable to code behind

Apr 12 2015 6:35 AM
hi  folks
i am write one javascript function
as below

i want to pass the a value to the my code behind .how i pass it

  <script type="text/javascript">
       function myKeyPress(e) {

           var keynum;

           if (window.event) { // IE
               keynum = e.keyCode;
           } else
               if (e.keyCode==13) { // Netscape/Firefox/Opera
                   keynum = e.which;
                   alert(String.fromCharCode(keynum));
               }
               else if (e.keyCode == 65) {
                  
                   return false;
               }
           var a = String.fromCharCode(keynum);
            
       }
</script>

Answers (4)