Math.pow() Javascript
RUN
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> </head> <body> <h1>Học lập trình miễn phí tại freetuts.net</h1> <p id="result"></p> <button onclick="myFunction()">Run</button> <script> function myFunction() { var content = "8<sup>2</sup> = " + Math.pow(8, 2) + '<br>'; content += "9<sup>3</sup> = " + Math.pow(9, 3) + '<br>'; content += "3<sup>4</sup> = " + Math.pow(3, 4) + '<br>'; document.getElementById("result").innerHTML = content; } </script> </body> </html>
PHÓNG TO