write a table using javascript dom

<!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">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>javascript dom Test  </title>
<script language="javascript">
function createTable()
    var $=document;
    var table=$.createElement("table");
    var tbody=$.createElement("tbody");   


    for(var m=0;m<5;m++)
        var tr=tbody.insertRow(m);
        for( var n=0;n<8;n++)
            var td=tr.insertCell(n);
            td.innerHTML= (m+1)+","+(n+1) ;


<body onload="createTable()">
分类:Web 时间:2010-05-28 人气:257
blog comments powered by Disqus


  • 关于AFNetworking 中Expected content type {( "text/... 2013-07-03

    [AFJSONRequestOperation addAcceptableContentTypes:[NSSet setWithObject:@"text/html"]];

  • script标签属性type与language使用选择 2015-04-25

    很多使用javascript的朋友都有着这样一个问题:script标签属性type与language使用应如何选择,为解决此疑惑,本文详细整理了一下,需要的朋友可以参考下 被人问起一个问题: <script language = "JavaScript"> <script type="text/javascript"> <script> 这三个标签的使用有什么区别? 虽然一直在用,却也没有好好去弄清楚,这里详细说明一下. 查阅一些

  • drupal theme: Design of page layout according to content type 2010-09-08

    By the Evance on Monday, 2007-12-24 08:54 text published sources: Customising the full page layout and sections based on node type Translation: Evance | drupal theme: Design of page layout in accordance with the content type description: This article

  • HTML教程:INPUT type=text元素 | input type=text对象 2014-09-30

    INPUT type=text元素 | input type=text 创建一个单行的文本输入控件. 成员表 下面的表格列出了 input type=text 对象引出的成员.请单击左侧的标签来选择你想要查看的成员类型. 标签属性/属性 标签属性 属性 描述 ACCESSKEY accessKey 设置或获取对象的快捷键. ATOMICSELECTION 指定 元素 及其内容是否可以一不可见单位统一选择. AUTOCOMPLETE autocomplete 设置或获取对象的自动完成状态. BEG

  • nginx gzip duplicate MIME type "text / html" 2010-09-14

    Instruction [# Gzip gzip] [# Gzip_buffers gzip_buffers] [# Gzip_comp_level gzip_comp_level] [# Gzip_min_length gzip_min_length] [# Gzip_http_version gzip_http_version] [# Gzip_proxied gzip_proxied] [# Gzip_types gzip_types] After the upgrade to the l

  • 如何用正则取input type="text"中的value 2014-02-04

    1.如何通过正则取input type="text"中的value呢? 2.如何过滤掉input type="checkbox"的标签? 这样只能达到正则取input type="text"中的value可是不能过滤掉input type="checkbox"的标签! alert [Ctrl+A 全选 注:如需引入外部Js需刷新才能执行] alert [Ctrl+A 全选 注:如需引入外部Js需刷新才能执行] 解决: aler

  • AAS 7.0下一个Error content type错误的处理 2012-03-09

    近日,合作伙伴在使用AAS 7.0的时候,碰到一个后台抛异常,前端没问题的现象:一点击应用中的"导出Excel",后台即抛出如下异常: 2011-12-07 09:55:06 错误 [apusic.web.response] Error content type: application/x-msdownload; java.lang.StringIndexOutOfBoundsException: String index out of range: 1 at java.lang.S

  • Flash CS4: can not find the action script 2.0 type checking issue the required documents toplevel.as 2010-09-06

    When using Flash CS4, preview, press Ctrl + Enter, often output an error message, "Unable to find action script 2.0 file type checking required" toplevel.as ". Make sure that the directory" $ (LocalData) / Classes "Preferences in

  • Execute VBA script code says "type mismatch" 2010-10-15

    Leadership meeting yesterday to talk about a report on the operation support system needs of data processing, that is, to an excel sheet in a excel copy data to another table, also can be operated manually, in order to liberate the workforce, Operati

  • [Transfer] C language pointer type void and the void 2010-11-08

    Many beginners in C pointer type void and void is not very understanding. So often in the use of some errors, this article will tell you about the void and the void pointer type to use methods and techniques. First, we say that void is the meaning of

iOS 开发

Android 开发

Python 开发



PHP 开发

Ruby 开发






Javascript 开发

.NET 开发



Copyright (C) codeweblog.com, All Rights Reserved.

CodeWeblog.com 版权所有 闽ICP备15018612号

processed in 0.439 (s). 10 q(s)