<img name="sImg"   style="width:<bean:write name="element" property="width" />;height:<bean:write name="element" property="height" />;"  src='<bean:write name="IMG_PATH" /> 
上边得到的值就是下边的 53,34,但删除这条记录则会有显示的问题
<img name="sImg"   style="width:53;height:34;"  src='<bean:write name="IMG_PATH" />这会有何不同?

解决方案 »

  1.   

    应该没有不同。
    我注意到你style中“width”后边的引号是中文的,许是此处的问题?
    另外,在样式规则中,最好加上单位。改成:
    <img name="sImg"  style="width:53px;height:34px;"  src='<bean:write name="IMG_PATH"' /> 
    或:
    <img name="sImg"  width="53" height="34"  src='<bean:write name="IMG_PATH"' />