<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>www.gzhankh.com</title>
<script language="javascript">
alert("hello world");
alert("hello GzhAnkh!!!");
num=10;
info=100;
alert("数字:"+num+";字符串"+info);
if(num=10)
{
alert("数字"+num);
}
</script>
</head>
<body>
<script lauguage="javascript">
alert("good luck");
document.write("<h1>hello</h1>");
</script>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>www.gzhankh.com</title>
<script language="javascript">
var rows=5;
var cols=10;
document.write("<table border=\"1\">");
for(i=0;i<=rows;i++)
{
document.write("<tr>");
for(j=0;j<cols;j++)
{
document.write("<td>"+i*j+"</td>");
}
document.write("</tr>");
}
document.writer("</table>");
</script>
</head>
<body>
<script language="javascript">
document.write("<table border=\"1\">");
var a=9;
var b=9;
for(c=1;c<=a;c++)
{
document.write("<tr>");
for(d=1;d<=b;d++)
{
if(d<=c)
{
document.write("<td>"+c+" * "+d+" = "+c*d+"</td>");
}
else
{
document.write("<td> </td>");
}
}
document.write("</tr>");
}
document.write("</table>");
function fun()
{
alert("hello world!");
return"www.gzhankh";
}
alert(fun());
</script>
</body>
</html>
借着一点点空闲时间慢慢学习javaWeb,内容简单,但是基础一定要打牢固。
原文:https://www.cnblogs.com/Gzh001007/p/13662033.html