廉颇老矣,尚能饭否

java:从技术到管理

常用链接

统计

最新评论

js入门例题

js.html代码显示方式一(完整显示)
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Html welcome you</title>
<script>
alert('hello');
function fn() {
 alert('bbbbbbbbbbbbbbbbbb');
}
</script>
</head>
<body>
<h1>JS welcome you</h1>
<script>
//阶乘
document.write("<h1>阶乘</h1>");
var  fact = 1;
for (i = 1; i < 10; i++) {
 fact = fact * i;
 document.write(i + "i = " + fact + "<br>");
}
document.write("<br>");
document.write("<br>");

//斐波那契数列
document.write("<h1>table of Fibonacci Numbers</h1>");
for (i = 0, j = 1, k = 0, fib = 0; i < 50; i++, fib = j + k, j = k, k = fib) {
 document.write("Fibonacci (" + i + ") = " + fib);
 document.write("<br>");
}
</script>
<button onclick="alert('aaaaaaaaaaaaaaaaaaaaaaaa');">
click here</button><br>
<button onclick="fn()">
click other</button>
</body>
</html>

js.html代码显示方式一(简单显示:省略html,head,body)

<script>
 alert('hello');
 function fn() {
  alert('bbbbbbbbbbbbbbbbbb');
 }
</script>
<h1>JS welcome you</h1>
<script>
 //阶乘
 document.write("<h1>jiecheng</h1>");
 var fact = 1;
 for (i = 1; i < 10; i++) {
  fact = fact * i;
  document.write(i + "i = " + fact + "<br>");
 }
 document.write("<br>");
 document.write("<br>");

 //斐波那契数列
 document.write("<h1>table of Fibonacci Numbers</h1>");
 for (i = 0, j = 1, k = 0, fib = 0; i < 50; i++, fib = j + k, j = k, k = fib) {
  document.write("Fibonacci (" + i + ") = " + fib);
  document.write("<br>");
 }
</script>
<button onclick="alert('aaaaaaaaaaaaaaaaaaaaaaaa');">click here</button>
<br>
<button onclick="fn()">click other</button>



柳德才
13691193654
18942949207
QQ:422157370
liudecai_zan@126.com
湖北-武汉-江夏-庙山

posted on 2009-01-19 14:40 liudecai_zan@126.com 阅读(357) 评论(0)  编辑  收藏 所属分类: ExtJS


只有注册用户登录后才能发表评论。


网站导航: