其他的部分是用php做的,只有这个问题没解决,如果有高手能提供用php解决的方案也很感激。

解决方案 »

  1.   

    用CreateTextFile生成一个文本文件,再用write写入到文件中。。至于HTML语言中的语言都用脚本语言来写,如document.write("<tr>");通过条件加循环读取文本中的内容到表格中就成了。
      

  2.   

    你试试,是要实现这样的效果吗
    <Script language=javaScript>
    function LianJie()
    {
    //selValue=mainTab.rows[0].cells[0].childNodes[0].innerText;
    //selValue=window.sel.innerText
    selValue=window.sel[sel.selectedIndex].text
    texValue=window.text1.value;
    innValue=selValue+texValue;
    newRow=mainTab.insertRow()
    newCell=newRow.insertCell()
    newCell.innerText=innValue;

    </Script>
    <Table id=Tab>
    <TR>
    <TD>
    <select style="width:200px;" id="sel" Name="sel">
    <option>sdfsdfsdfdsfsdf</option>
    <option>1111111111111</option>
    <option>222222222222</option>
    </select>
    </TD>
    <TD>
    <input type=text Name="text1" id="test1">
    </TD>
    <TR>
    <input type=button value="连接" onClick=LianJie()>
    <Table>
    <Table border=1 id="mainTab">
    </Table>
      

  3.   

    能给出具体的实现么?
    另外这个表格中的内容还要存储到数据库中的,通过另外的一个表单(PHP的)。
      

  4.   

    对了,忘了和你说我的文件后缀名是html或者是asp
      

  5.   

    我现在用php+mysql做的一个页面,页面前半段是一些text输入框,后半段就是我开始说的那些,有下拉选择,有text输入,另个一个add按钮,当选择好内容,填入text后点add按钮,会在此页面中生成刚才所填内容的列表,这些步骤可重复,当结束后,点页面最底部的submit按钮,将这个页面递交出去。
    呵呵,比较罗嗦,不过算说明白了,请大家帮忙!
      

  6.   

    我的这个不行吗,我会asp,不怎么明白php,但如果php 支持 Javascript的话我的那个应该可以
    <Script language=javaScript>
    function LianJie()
    {
    //selValue=mainTab.rows[0].cells[0].childNodes[0].innerText;
    //selValue=window.sel.innerText
    selValue=window.sel[sel.selectedIndex].text
    texValue=window.text1.value;
    innValue=selValue+texValue;
    newRow=mainTab.insertRow()
    newCell=newRow.insertCell()
    newCell.innerText=innValue;

    </Script>
    <Table id=Tab>
    <TR>
    <TD>
    <select style="width:200px;" id="sel" Name="sel">
    <option>sdfsdfsdfdsfsdf</option>
    <option>1111111111111</option>
    <option>222222222222</option>
    </select>
    </TD>
    <TD>
    <input type=text Name="text1" id="test1">
    </TD>
    <TR>
    <input type=button value="连接" onClick=LianJie()>
    <Table>
    <Table border=1 id="mainTab">
    </Table>
      

  7.   

    你要的是这样的效果吧,你把我的文件保存成html的格式
    <Script language=javaScript>
    function LianJie()
    {
    //selValue=mainTab.rows[0].cells[0].childNodes[0].innerText;
    //selValue=window.sel.innerText
    selValue=window.sel[sel.selectedIndex].text
    texValue=window.text1.value;
    nameValue=window.text2.value;
    ageValue=window.text3.value;
    innValue=selValue+texValue;
    newRow=mainTab.insertRow()
    newCell=newRow.insertCell()
    newCell.innerText="姓名:";
    newCell=newRow.insertCell()
    newCell.innerText=nameValue;
    newRow=mainTab.insertRow()
    newCell=newRow.insertCell()
    newCell.innerText="年龄";
    newCell=newRow.insertCell()
    newCell.innerText=ageValue;
    newRow=mainTab.insertRow()
    newCell=newRow.insertCell()
    newCell.innerText="连接";
    newCell=newRow.insertCell()
    newCell.innerText=innValue;

    </Script>
    <Table id=Tab>
    <TR>
    <TD>
    姓名:<Input type=text Name=text2 id=text2>
    </TD>
    <TD> 年龄:<Input type=text Name=text3 id=text3>
    </TD>
    </TR>
    <TR>
    <TD>
    <select style="width:200px;" id="sel" Name="sel">
    <option>sdfsdfsdfdsfsdf</option>
    <option>1111111111111</option>
    <option>222222222222</option>
    </select>
    </TD>
    <TD>
    <input type=text Name="text1" id="test1">
    </TD>
    <TD>
    <input type=button value="连接" onClick=LianJie()>
    </TD>
    <TR><Table>
    <Table border=1 id="mainTab">
    </Table>
      

  8.   

    RenXiaoDan(希)
    如果在显示区的每行后面增加一个删除复选矿,在增加一个删除按钮,点击删除按钮删掉选中的行,又该如何实现?