xlst里面可不可以插入Javascript脚本?解决问题了一定给分
colee 2002-10-25 09:22:09 但我试过后,脚本里面不能含有中括号"{”或“}”,否则无效
这是怎么回事,在XSLT里要怎么实现下面这段代码?
<script language="Javascript">
var width=document.img.width;
var height=document.img.height;
if (width/height>2)
{if (width>220){ document.img.width=220;}}
else
{if(height>110){ document.img.height=110; }}
</script>
或者说怎么把上面代码全部插入到下面Onload里面,但好像包含了中括号就没效了,
<img name="img" onload="javascript:if(this.height>110) his.height=110; ">
为了这个问题,我不知浪费了多少时间,各位高手帮忙啊。。。