在父页面中有一个按钮 当点击这个按钮的时候弹出小页面,该小页面是一个列表页面,选择数据以后自动关闭小页面,父页面自动添加一行,并以文本框的形式显示小页面传回的数据,并且在父页面中可以动态删除这条数据,应该怎么做啊,急!!!!!!!!!!!!!!!

解决方案 »

  1.   

    此回复为自动发出,仅用于显示而已,并无任何其他特殊作用
    楼主【qiyuming_qi】截止到2008-07-29 09:26:18的历史汇总数据(不包括此帖):
    发帖的总数量:1                        发帖的总分数:0                        每贴平均分数:0                        
    回帖的总数量:0                        得分贴总数量:0                        回帖的得分率:0%                       
    结贴的总数量:0                        结贴的总分数:0                        
    无满意结贴数:0                        无满意结贴分:0                        
    未结的帖子数:1                        未结的总分数:0                        
    结贴的百分比:0.00  %               结分的百分比:---------------------
    无满意结贴率:---------------------无满意结分率:---------------------
    如何结贴请参考这里:http://topic.csdn.net/u/20080501/09/ef7ba1b3-6466-49f6-9d92-36fe6d471dd1.html
      

  2.   

    a.htm<script>
    var names = 0;
    </script>
    <html>
    <body>
    <input type="button" value="新增" onClick="add();">
    <label id="hehe">
    <table>
    <tr>
    <td><input type="text" name="returnValue0" value="123"></td>
    </tr>
    </table>
    </label>
    </body>
    </html>
    <script>
    function add(){
    names ++;
    window.open("b.htm?names=returnValue"+names,"asdfaf","top=60,left=150,height=150,width=200,toolbar=no,menubar=no,location=no,status=yes");
    }
    </script>
    b.htm
    <html>
    <body>
    <table cellSpacing="0" cellpadding="0" border="1">
    <tr onDblClick="selectThis('哈哈');">
    <td>哈哈</td>
    </tr>
    <tr onDblClick="selectThis('呵呵');">
    <td>呵呵</td>
    </tr>
    <tr onDblClick="selectThis('(*^__^*) 嘻嘻……');">
    <td>(*^__^*) 嘻嘻……</td>
    </tr>
    </table>
    </body>
    </html>
    <script>
    function selectThis(val){
    var loc = location.href;
    var str = loc.substring(loc.indexOf("=")+1);
    window.opener.document.all("hehe").innerHTML += "<table><tr><td><input type='text' name="+ str +" value="+ val +"></td></tr></table>";
    window.close();
    }
    </script>
    如果用jsp做的话会简单一些
      

  3.   

    如果要删除a.htm<script>
    var names = 0;
    </script>
    <html>
    <body>
    <input type="button" value="新增" onClick="add();">
    <label id="hehe">
    <label id="haha0">
    <table>
    <tr>
    <td><input type="text" name="returnValue0" value="123"></td>
    <td><a href="javascript:del('0');">删除</a></td>
    </tr>
    </table>
    </label>
    </label>
    </body>
    </html>
    <script>
    function add(){
    names ++;
    window.open("b.htm?names="+names,"asdfaf","top=60,left=150,height=150,width=200,toolbar=no,menubar=no,location=no,status=yes");
    }
    function del(str){
    document.all("haha"+str).innerHTML = "";
    }
    </script>
    b.htm<html>
    <body>
    <table cellSpacing="0" cellpadding="0" border="1">
    <tr onDblClick="selectThis('哈哈');">
    <td>哈哈</td>
    </tr>
    <tr onDblClick="selectThis('呵呵');">
    <td>呵呵</td>
    </tr>
    <tr onDblClick="selectThis('(*^__^*) 嘻嘻……');">
    <td>(*^__^*) 嘻嘻……</td>
    </tr>
    </table>
    </body>
    </html>
    <script>
    function selectThis(val){
    var loc = location.href;
    var str = loc.substring(loc.indexOf("=")+1);
    window.opener.document.all("hehe").innerHTML += "<label id='haha"+ str +"'><table><tr><td><input type='text' name='returnValue"+ str +"' value='"+ val +"'></td><td><a href=javascript:del('"+ str +"');>删除</a></td></tr></table></label>";
    window.close();
    }
    </script>