<span style='cursor:hand' title='缩短对话框' onClick='if (me.size>10)me.size=me.size-2'>-</span> 
<input name="txttitle" id=me type="TEXT" size=30 maxlength=100 style="background-color:ffffff;color:000000;border: 1 double"> 
<span style='cursor:hand' title='加长对话框' onClick='if (me.size<102)me.size=me.size+2'>+</span>

解决方案 »

  1.   

    找到了<input style="overflow-x:visible">抄自:http://www.csdn.net/expert/topic/651/651925.xml?temp=.1987421呵呵,这样的代码才漂亮嘛
      

  2.   

    有了这个,用户就不想拖拽了。不过据说在IE5.0下面不干活,我也不知道要怎么搞定,你好好求求秋水(GG||JJ),说不定它就帮你想出来办法了。
      

  3.   

    上面的试过,在IE5中的确不行。
    看这个:
    <input onkeydown="this.size=(this.value.length+1)">不过仍有缺陷:中文不行,块头太大 :-)
      

  4.   

    呵呵,我都说了找我没用了,找秋水GG||JJ嘛。
      

  5.   

    zz315::
    那就先判断以下this.value的值好了,是汉字的this.size=this.value.length+2,否则this.size.this.value.length+1
      

  6.   

    hehe,献丑了<input onkeyup='demo.innerText=this.value;this.style.width=demo.offsetWidth'>
    <table><td nowrap id=demo style=visibility:hidden;font-size:11pt></td></table>
      

  7.   

    版本高一点
    <input style='width:expression((this.value.length+((arr=this.value.match(/\W/g))?arr.length:1))*6.5)'>再高一点就是
    <input style="overflow-x:visible">