HTML代码

来源:百度知道 编辑:UC知道 时间:2024/05/15 16:47:24
这段代码怎么改不了图片大小,谁能给改改,发个相同作用的也可以!
谢谢!~~
<SCRIPT>
// the name of your first picture-file
var picture1="../../PjvI/image/5555.jpg"

// the name of your second picture-file
var picture2="../../PjvI/image/U150P115T9D85484F364DT20050227133329.jpg"

// the name of your second picture-file
var picture3="../image/U150P115T9D85484F169DT20050227133329.jpg"

// the width and height of your pictures (pixels)
var picturewidth=140
var pictureheight=105

</SCRIPT>

<SCRIPT>
if (document.all) {
document.write('<OBJECT ID="DAControl_Wipe" ')
document.write('STYLE="width:'+picturewidth+';height:'+pictureheight+'"')
document.write('CLASSID="CLSID:B6FFC24C-7E13-11D0-9B47-00C04FC2F51D">')
document.write('</OBJECT>')
m = DAControl_Wipe.MeterLibrar

// JScript 文件

//var flag=false;
function DrawImage(ImgD,w,h){
var image=new Image();
image.src=ImgD.src;
if(image.width > 0 && image.height > 0)
{
//flag=true;
if(image.width/image.height >= w/h)
{
if(image.width > w)
{
ImgD.width=w;
ImgD.height=(image.height*w)/image.width;
}
else
{
ImgD.width=image.width;
ImgD.height=image.height;
}

//ImgD.alt=image.width+"x"+image.height;
}
else
{
if(image.height>h){
ImgD.height=h;
ImgD.width=(image.width*h)/image.height;
}
else
{
ImgD.width=image.wid