既然你不知道大小,你就不要设值了,没有width,height,它自己会调整的。

解决方案 »

  1.   

    这不是jsp的问题,用javascript可以处理吧
    WIDTH Attribute | width Property  Internet Development Index --------------------------------------------------------------------------------Sets or retrieves the calculated width of the object. SyntaxHTML <ELEMENT WIDTH = iWidth... >  
    Scripting object.width [ = iWidth ] Possible ValuesiWidth Integer that specifies or receives one of the following values.width Integer that specifies the width of the object in pixels or as a percentage. 
    percentage String that specifies an integer value followed by a %. The value is a percentage of the width of the parent object.
      

  2.   

    我也关注。我做了一个HTML在线编辑器,允许用户上传图片,并自动插入。可我想插入的时候默认就是图片本身的大小,不知道怎么做(HTML代码必须要写高和宽,不写的那种我不要)。
      

  3.   

    找到了!
    http://community.csdn.net/Expert/topic/3458/3458714.xml?temp=.7632868
    这个加水印的方法里就可以获取到了,^_^