周数 专业目标学习 专业学习时间 博客发表量 人文方面的学习 知识技能总结
8 数据结构与算法,HTML,计算机网络基础 平均3小时/天 8 四级词汇 HTML完成了动态表格,我觉得网页制作表面虽然光鲜亮丽,看起来很简单,但是背后的代码是需要花很长时间才能写出来的
  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
  <head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <title>动态表格</title>
  <script type="text\javascript">
  str+="</table>"
  var row=3;
  var col=3;
  function ok(row,col)
  {
  for(var i=0;i<row;i++)
  {
  str+="<tr>";
  for(var j=0;j<col;j++)
  {
  str+="<td>"+(i*3+j)+"</td>";
  }
  str+="</tr>";
  }
  str+="</table>";
  document.getElementById("w").innerHTML=str;
  }
  function cs()
  {
  var row=document.getElementById("t1").value;
  var col=document.getElementById("t2").value;
  ok(row,col);
  }
  (/script)
  </head>
  <html>
  <body>
  <div >test</div>
  <input type="text" size="10" />
  <input type="text" size="10" />
  <input type="button" onclick="cs();" />
  </body>
  </html>
  </body>
  </html>
   

 

相关文章:

  • 2021-05-23
  • 2021-10-29
  • 2021-08-23
  • 2022-01-04
  • 2021-08-30
  • 2022-01-13
  • 2021-12-14
  • 2021-08-07
猜你喜欢
  • 2022-01-03
  • 2021-12-09
  • 2021-11-29
  • 2021-06-27
  • 2021-05-30
  • 2021-07-08
相关资源
相似解决方案