<! DOCTYPE HTML> <HTML> <head> <Meta charset = "UTF-8"> <title> newbie tutorial (runoob.com) </ title> </ head> <body> <h1> My first page </ h1> <the p-> my first paragraph. </ P> <Script> window.alert ( . 5 +. 6 ); </ Script> </ body> </ HTML>
<! DOCTYPE HTML> <HTML> <head> <Meta charset = "UTF-8"> <title> newbie tutorial (runoob.com) </ title> </ head> <body> <h1> My first Web page </ h1> <the p-the above mentioned id = "Demo"> my first paragraph. </ P> <Script> document.getElementById ( "Demo") the innerHTML = "modified paragraph.." ; </ Script> </ body> </ HTML>
<! DOCTYPE HTML>
<HTML>
<head>
<Meta charset = "UTF-8">
<title> newbie tutorial (runoob.com) </ title>
</ head>
<body>
<h1> My first Web page </ h1>
<the p-> my first paragraph. </ P>
<Script>
document.write (a Date ());
</ Script>
</ body>
</ HTML>
<! DOCTYPE HTML> <HTML> <head> <Meta charset = "UTF-8"> <title> newbie tutorial (runoob.com) </ title> </ head> <body> <h1> My first Web page </ h1> <the p-> my first paragraph. </ P> <Button the onclick = "myFunction ()"> Point I </ Button> <Script> function myFunction () { document.write (a Date ()); } </ Script> </ body> </ HTML>
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>菜鸟教程(runoob.com)</title> </head> <body> <h1>我的第一个 Web 页面</h1> <p> 浏览器中(Chrome, IE, Firefox) 使用 F12 来启用调试模式, 在调试窗口中点击 "Console" 菜单。 </p> <script> a = 5; b = 6; c = a + b; console.log(c); </script> </body> </html>