Ví dụ RUN
 
1
<!DOCTYPE html>
2
<html>
3
    <head>
4
        <meta charset="utf-8">
5
    </head>
6
    <body>
7
        <h1>Học lập trình miễn phí tại freetuts.net</h1>
8
    
9
        <button onclick="myFunction()">Run</button>
10
    
11
        <p id="demo"></p>
12
    
13
        <script>
14
            function myFunction() {
15
                var content ='E<sup>2</sup> = ' +  Math.exp(2) + '<br>';
16
                content = content + 'E<sup>4,2</sup> = ' +  Math.exp(4,2) + '<br>';
17
                content = content + 'E<sup>-4</sup> = ' +  Math.exp(-4) + '<br>';
18
                content = content + 'E<sup>abc</sup> = ' +  Math.exp('abc') + '<br>';
19
                document.getElementById("demo").innerHTML = content;
20
            }
21
        </script>
22
    </body>
23
</html>