javascript - math.pow results not displaying -


trying math.pow function display not. labels should answer 77^39 mod 517, etc.

 <body> <p><input type="button" value="encrypt message" id="encbutton" onclick="encrypt()" name="encbutton" /></p> <p id="encryptresultlabel1"></p> <p id="encryptresultlabel2"></p> <p id="encryptresultlabel3"></p> <p id="encryptresultlabel4">&nbsp</p> </body> <script> function encrypt(){ var g = ((math.pow(77, 39)) % 517); var h = ((math.pow(65, 39)) % 517); var j = ((math.pow(84, 39)) % 517); var k = ((math.pow(73, 39)) % 517); displayresult(g, "encryptresultlabel1"); displayresult(h, "encryptresultlabel2"); displayresult(j, "encryptresultlabel3"); displayresult(k, "encryptresultlabel4"); } </script> 

use math instead of math.

refer link more detail.

var g = ((math.pow(77, 39)) % 517);  //output - 21  var h = ((math.pow(65, 39)) % 517);  //output - 103 var j = ((math.pow(84, 39)) % 517);  //output - 210 var k = ((math.pow(73, 39)) % 517);  //output - 132 

Comments

Popular posts from this blog

c++ - OpenMP unpredictable overhead -

ruby on rails - RuntimeError: Circular dependency detected while autoloading constant - ActiveAdmin.register Role -

javascript - Wordpress slider, not displayed 100% width -