Ví dụ
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> <button onclick="myFunction()">Run</button> <p id="demo"></p> <script> function myFunction() { var content ='E<sup>2</sup> = ' + Math.exp(2) + '<br>'; content = content + 'E<sup>4,2</sup> = ' + Math.exp(4,2) + '<br>'; content = content + 'E<sup>-4</sup> = ' + Math.exp(-4) + '<br>'; content = content + 'E<sup>abc</sup> = ' + Math.exp('abc') + '<br>'; document.getElementById("demo").innerHTML = content; } </script> </body> </html>
PHÓNG TO