在opner页面中加一个容器,例如<span id=spContainer></span>在本页面中加入 window.opner.spContainer.innerHTML=document.all("搜索出来的表格的name").outerHTML;

解决方案 »

  1.   

    window.opner.spContainer.innerHTML=document.all("youtable").outerHTML;用表格name好像不好用,可以换用表格id < table id="youtable">
      

  2.   

    如果我搜出来的记录在opener里已经存在的话,我要过滤掉的!
      

  3.   

    ?如果我搜出来的记录在opener里已经存在的话,我要过滤掉的!
      

  4.   

    ?如果我搜出来的记录在opener里已经存在的话,我要过滤掉的!
      

  5.   

    要作过滤,只有一条条比较,在双方设checkbox纪录ID,然后有重复则
    break;
      

  6.   

    var tab = window.opener.document.all.tableId; //取到父窗口中的的表格对象
    var meizz = {}; //定义一个结构体
    for(var i=0; i<tab.rows.length; i++)
    {
      meizz[tab.rows[i].cells[0].innerText] =  //这里是以人名做为唯一索引
      {
        "name"  : tab.rows[i].cells[0].innerText,
        "birth" : tab.rows[i].cells[1].innerText,
        "area"  : tab.rows[i].cells[2].innerText,
        "job"   : tab.rows[i].cells[3].innerText
      }
    }
    var newRecords = new Array();
    <% do while not rs.eof %>
    if(typeof(meizz["<%= rs("username") %>"])=="undefined")
    {
      meizz["<%= rs("username") %>"] =
      {
        "name"  : "<%= rs("username") %>",
        "birth" : "<%= rs("birthyear") %>",
        "area"  : "<%= rs("birtharea") %>",
        "job"   : "<%= rs("job") %>"
      }
    }
    newRecords[newRecords.length] = meizz["<%= rs("username") %>"];
    <% rs.movenext : loop %>
    for(var i=0; i<newRecords.length; i++)
    {
      var tr = tab.insertRow(tab.rows.length);
      tr.insertCell().innerText = newRecords.name;
      tr.insertCell().innerText = newRecords.birth;
      tr.insertCell().innerText = newRecords.area;
      tr.insertCell().innerText = newRecords.job;
    }