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 = ' 4 - ' + isNaN(4) + '<br>'; content = content + ' 0/0 - ' + isNaN(0/0) + '<br>'; content = content + ' 0/0Hello - ' + isNaN('Hello') + '<br>'; content = content + ' Hello - ' + isNaN('Hello') + '<br>'; content = content + ' -5 - ' + isNaN(- 5) + '<br>'; content = content + ' infinity - ' + isNaN(Infinity) + '<br>'; document.getElementById("demo").innerHTML = content; } </script> </body> </html>
PHÓNG TO