一段简单的代码用来在网页上测试javascript程序
最近在看javascript,就写了一段简单的网页代码,方便自己看,如下图:
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <script language="Javascript" type="text/javascript" > var num=14*2; {alert ("14*2="+num); } </script> </head> <body> </body> </html>
再来一段:
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <script language="Javascript" type="text/javascript" > var num1=5; var num2=10; var message="5+10="+(num1+num2); {alert (message); } </script> </head> <body> </body> </html>