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 ='Điểm có tạo độ(3,6) vậy góc tạo thành là x = ' + Math.atan2(3, 6)+' radians <br>'; content = content+'Điểm có tạo độ(6,3) vậy góc tạo thành là x = ' + Math.atan(6, 3)+' radians <br>'; content = content+'Điểm có tạo độ(7,2) vậy góc tạo thành là x = ' + Math.atan(7, 2)+' radians <br>'; content = content+'Điểm có tạo độ(1,3) vậy góc tạo thành là x = ' + Math.atan(1, 3)+' radians <br>'; content = content+'Điểm có tạo độ(y,x) vậy góc tạo thành là x = ' + Math.atan('y', 'x')+' radians <br>'; document.getElementById("demo").innerHTML = content; } </script> </body> </html>
PHÓNG TO