这个<body>
<table border=1>
<tr>
<td width=200 height=10><image src="http://hiphotos.baidu.com/jetyinghuochong/abpic/item/8ab81b3f273887ef54e72390.jpg" style="width:expression(this.parentNode.width);height:expression(this.parentNode.height)"></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
</tr>
</table>
</body>

解决方案 »

  1.   

    <td width=200 height=10>可根椐td来调整
      

  2.   

    <img> 标签的内容不能更改,因为是已经存入mysql里的内容。
    我的意思是已经有一段代码:<IMG  onclick='image_window(this)' style='cursor:pointer;' style="WIDTH: 375px; HEIGHT: 500px" src="03_copy2.jpg" >,不更改这部分代码的前提下。能不能加上一段script,重新控制一下图片的属性?
      

  3.   

    我看了下,方法好像没什么问题,
    似乎是onclick里面的方法名写错了~
    onclick='image_window(this)'
    resize_image()
      

  4.   

    to lap1983() 
    不是这里的问题。
    只要能把style里的内容除去问题就会解决。显示图片时,还是:style="WIDTH: 375px; HEIGHT: 500px",这段代码执行了。但是怎么把style里的内容除去。
    用php正则好写吗?
      

  5.   

    问题解决,谢谢各位。
    我的javascript太菜了。
    程序尾加入:
                target[i].style.width = image_width;
                target[i].style.height = parseInt(image_width / image_height);
    解决!