var objGroup = document.createElement("DIV");  //创建DIV
var objTitle = document.createElement("DIV");  //创建DIV
var objContent = document.createElement("DIV");  //创建DIV
var objTopices = document.createElement("TABLE");  //创建TABLE
var objTopicesBody = document.createElement("TBODY");//创建TBODY
var objTopicToolTip = document.createElement("DIV");//创建DIV

objGroup.className = "listGroup";       //设各对象的类
objContent.className = "listContent";
objTopices.className = "listTopices";
objTopicToolTip.className = "topicToolTip";
objContent.style.display = "none";     //不显示
objContent.setAttribute("loaded", false); //设loaded属性
objContent.setAttribute("page", 1);       //设page属性

解决方案 »

  1.   

    //组一个table的HTML字符串
    titleHTMLString = "<table class=listTitle border=0><tr>";
    titleHTMLString += "<td class=datactrl width=20 url=" + strUrl + " forumid=" + forumID + ">";
    titleHTMLString += "<img id=" + idGroupIcon + " class=listGroupIcon border=0 width=16 height=15 align=absmiddle src=" + ImgGroupCollapse + "></img></td>";
    /* lee1892 */
    //titleHTMLString += "<td class=listTitleLink><a target='_blank' href=" + strUrl + ">" + strName + "</a><font id=" + idPageNum + " class=listPageNum></font></td>";
    titleHTMLString += "<td class=listTitleLink><a id=" + idGroupAnchor + " title=" + IDS_LISTICON + " href='#'>" + strName + "</a><font id=" + idPageNum + " class=listPageNum></font></td>";
    /* end */
    titleHTMLString += "<td class=listIndicator id=" + idIndicator + "></td>";
    titleHTMLString += "</tr></table>";


    //将table加入objTitle这个DIV里
    objTitle.innerHTML = titleHTMLString;
    objTitle.style.paddingLeft = "5px";

    objTopices.appendChild(objTopicesBody);//将objTopicesBody插入objTopices中
    objContent.appendChild(objTopices);//将objTopices插入objContent中

    objGroup.appendChild(objTitle); /*增加三个子元素*/
    objGroup.appendChild(objContent);
    objGroup.appendChild(objTopicToolTip);
      

  2.   

    var objIndicator = objTitle.all(idIndicator);  //在objIndicator中找到id=idIndicator的元素
    CreateIndicator(objIndicator);    //这里应该是调他自己的函数了
    CreateToolTip(objTopicToolTip);   //这里应该是调他自己的函数了 var objGroupIcon = objTitle.all(idGroupIcon);//在objGroupIcon中找到id=idGroupIcon的元素
    if (objGroupIcon != null)//找到
    {
    //objGroupIcon.addBehavior(datacontroller);
    objGroupIcon.onclick = DownloadFirstPage;//绑上DownloadFirstPage事件
    }
    /* lee1892 */
    var objGroupAnchor = objTitle.all(idGroupAnchor);//基本同上
    if (objGroupAnchor != null)
    {
    objGroupAnchor.onclick = function()
    {
    openInBrowser(strUrl);
    }
    }
    /* end */
    element.appendChild(objGroup);//在element里面插入objGroup
    countTopics ++;
      

  3.   

    var objGroup = document.createElement("DIV");这个是什么意思呢??
    在什么地方可以找到这些资料呢?? 
      

  4.   

    用这些语句创建的HTML文件,怎么看呢??点击 View Source 只看到 javaScript 脚本。
      

  5.   

    机器上装office了吗?搜下htmlref.chm
      

  6.   

    装了office,
    如何查看呢javascript生成的脚本呢??谢谢大家了,网页相关的基础太差了。