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 = '14Hello - ' + Number('14Hello') + '<br>'; content = content + '999 - ' + Number(999) + '<br>'; content = content + 'Date() - ' + Number(new Date()) + '<br>'; content = content + ' freetuts.net - ' + Number('freetuts.net') + '<br>'; document.getElementById("demo").innerHTML = content; } </script> </body> </html>
PHÓNG TO