我也运行ok,你用的overflow-y属性并不是标准的属性,错误又可能来自这里

解决方案 »

  1.   

    你的代码实在罗嗦,我把你的代码简化了,试试看!你的要求满足了
    <HTML>
    <HEAD>
    <META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
    <TITLE></TITLE>
    <SCRIPT ID=clientEventHandlersJS LANGUAGE=javascript>
    <!--
    function edit(){
       editBody.style.display="block";
        obj_inputtext.focus();
    }
    function add(sid){//1:修改旧条目||0:添加新条目
        var str=obj_inputtext.value;
    if(str=='')return alert('请输入内容');
    if(!sid)a1.innerHTML+='<span onclick="getContent(this)">'+str+'</span><br>';
        else document.all[sid].innerText=str;
    obj_inputtext.value='';
    editBody.style.display="none";
        OK.onclick=new Function('add()');}
    function del(sid){
        obj_inputtext.value='';
    editBody.style.display="none";
    if(sid)document.all[sid].outerHTML='';
    editBody.style.display="none";
    DEL.onclick=new Function('del()');
    }
    function getContent(e){
        var str=e.innerText;
    edit();
        obj_inputtext.value=str;
    obj_inputtext.focus();
        OK.onclick=new Function('add('+e.sourceIndex+')');
        DEL.onclick=new Function('del('+e.sourceIndex+')');
    }//-->
    </SCRIPT>
    </HEAD>
    <BODY>
    <div id="a1"></div><br>
    <div id="a2">
    <table id=editBody border='0' cellspacing='0' bordercolorlight='#008000' width='100%' style="display:none"><tr><td width='100%' colspan='2'><textarea  id='obj_inputtext' style='width: 100%; font-size: 10pt;overflow-y:visible'></textarea></td></tr><tr><td width='50%' align='left'>&nbsp;</td><td width='50%' align='right'><input type='button' value='√'  id='OK' onclick="add();"><input type='button' value='×'  name='DEL' onclick="del();"></td></tr>
    </table>
    </div><INPUT id=button1 type=button value=Button name=button1 LANGUAGE=javascript onclick="edit()">
    <input type=button value='gg' onclick="javascript:alert(a1.innerHTML)"> </BODY>
    </HTML>
      

  2.   

    “llrock(百乐宝)”修改的好,而且添加了新的功能,是不是楼主想要的?
      

  3.   

    <html>
    <head>
    <meta http-equiv="Content-Language" content="zh-cn">
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <meta name="GENERATOR" content="Microsoft FrontPage 4.0">
    <meta name="ProgId" content="FrontPage.Editor.Document">
    <title>New Page 1</title>
    </head>
    <script>
    //<input name='eshop' type='text' value='"+document.all.china.parentElement.innerText+"'>
    function effick(bb){
    var open="";
    var open1="";
    var StarNumber2="zzzz";
    var OfficeNumber=0;
    open="bask"+bb;
    open1="bask1";
    //alert(document.all(open).parentElement.innerText);
    eval(open).innerHTML="<table height='1'><tr><td width='90%' height='1' rowspan='2'><input name='Temoption' size='50' type='text' tabindex='1' value='"+document.all(open).parentElement.innerText+"'></td><td width='10%' height='1' align='top' ><input type='button' value='√' class='button'  name='B3' style='font-size:7pt;width:20;height:10' onclick=javascript:getoption("+ open + "," + open + ");></td></tr><tr><td align='top' height='1'><input type='button' value='×' class='button' name='B3' style='font-size:5pt;width:20;height:10' onclick=javascript:editarea("+ open + "," + open + ");></font></td></tr></table>";}function editarea(){
    alert("您是否要删除此行!");
    }function getoption(aa,cc){
    var Temstr="";
    var Temstr1="";
    Temstr=aa;
    eval(Temstr).innerHTML="<font color='red'>"+document.all.Temoption.value+"</font>";
    }
    function abc(){
    var number;
    var temlong;
    var number1;
    var number3;
    var number4;
    var number6;
    var number8="";number1=china.innerHTML.split('"')[0];
    //alert("33");
    if (number1==""){china.innerHTML="<table border='1'  bordercolor='#00FF00' width='100%'><!><tr><td name=wwx1 bordercolor='#0080FF' width='100%' onDblclick=javascript:effick(1);><div id='bask1'>1</div></td></tr><!></table>";}
    else{
    number6="";
    temlong=china.innerHTML.split('"').length-2;
    number=parseInt(china.innerHTML.split('"')[temlong].substr(3));number4=0;
    for (i=0;i<number+1;i++){
    number4=number4+1;number3="<tr><td name=wwx"+number4+" bordercolor='#0080FF' width='100%' onDblclick=javascript:effick("+number4+");><div id=bask"+number4+">"+number4+"</div></td></tr>";}
    number8=china.innerHTML.split("<!>")[1]+number3;
    number6=number8.split("<TBODY>")[1];
    china.innerHTML="<table border='1' cellpadding='0' cellspacing='0' width='100%' bordercolor='#00FF00' ><!>"+number6+"<!></table>";
    }}
    </script><body>
    <table border='1' cellpadding='0' cellspacing='0' width='100%'  >
    <tr><td width='100%'><div id=china></div></td></tr>
    <tr>
      <td align='center'><input  type='button' value='√' class='blue' name='B3' onclick=javascript:abc();> </td> </tr></table></body>
    </html>