|
Blue Forest http://www.lslnet.com at 8:28 on August 25, 2006
Javascript 急!!! ask a question!
"Script language=javascript>
Function imgresize (newwidth, newheight)
{
Var resizeWidth, resizeHeight;
ResizeWidth=100;// maximum width
ResizeHeight=100;// maximum height
Document.gallery_img.width=newwidth;
Document.gallery_img.height=newheight;
}
Function chgImg (imgname, dnimgname, imgdesc) (
Document.gallery_img.width=newwidth;
Document.gallery_img.height=newheight;
}
"/script>
Newheight [u]CHGIMG[/u] Lane in the newwidth and how to be able to read and newheight [u]imgresize[/u] Lane newwidth value of the country.
|
Anybody know? |
Save Global Variables |
Global Variables save her brother how to die. |
.........
Is on the outside, were about.
[code]
"Script language=javascript>
Var iGLBnewwidth;
Var iGLBnewheight;
Function imgresize (newwidth, newheight)
{
Var resizeWidth, resizeHeight;
ResizeWidth=100;// maximum width
ResizeHeight=100;// maximum height
Document.gallery_img.width=newwidth;
Document.gallery_img.height=newheight;
IGLBnewwidth=newwidth;
IGLBnewheight=newheight;
}
Function chgImg (imgname, dnimgname, imgdesc) (
Document.gallery_img.width= iGLBnewwidth;
Document.gallery_img.height=iGLBnewheight;
}
"/script>
[/code] |
Resolved.
Synopsis : //dkischool.com/zb41pl4/bbs/zboard.php?id=album&page=1&page_num=8&select_arrange=headnum&desc=&sn=off&ss=on&sc=on&keyword=&no=226&category=5#
Thank you dknt always help! |
Successful. And everybody to think about coding. Thank dknt
Http://e7358.com/art/download/test0116.htm test :
[html]
"!DOCTYPE HTML PUBLIC" -//W3C//DTD HTML 4.0 Transitional//EN ""
"Html>
"Head are
"Title>Untitled</title>
"/head>
"Body>
"Script language=javascript>
Var gallery_img_width;
Var gallery_img_height;
Function momoca_pic (newwidth, newheight) (
Gallery_img_width=newwidth*6
Gallery_img_height=newheight*6
}
Function imgresize (newwidth, newheight)
{
Var resizeWidth, resizeHeight;
ResizeWidth=200;// maximum width
ResizeHeight=200;// maximum height
If (newheight>resizeHeight)
{newwidth=newwidth* (ResizeHeight/newheight);
Newheight=newheight* (resizeHeight/newheight) ;}
If (newwidth>resizeWidth)
{newheight=newheight* (ResizeWidth/newwidth);
Newwidth=newwidth* (resizeWidth/newwidth) ;}
Document.gallery_img.width=newwidth;
Document.gallery_img.height=newheight;
}
Function chgImg (imgname, dnimgname, imgdesc) (
Var = /<br>/gi; myRegExp
Document.gallery_img.src=imgname;
Document.gallery_img.width=gallery_img_width;
Document.gallery_img.height=gallery_img_height;
}
Function thispic1 (Img, I_width, I_height)
{
If (Img.width "Img.height)
{
Img.width=I_width;
}
Else
{
Img.height=I_height;
}
}
"/script>
"Body>
"<img Name=gallery_img value=0 defended" http://www.xymv.com/lianlian/bann.gif "border=0 onload=" Javascript : imgresize (this.width, this.height); ""
"Organization Department Holds Press Conference
"A onclick=" chgImg ( '' '' 'fdsafsdaf'); "style='mso-footnote-id:ftn1'" # "and" various factions defended "" HSPACE=1 VSPACE=1 border=0> "title" onload= "thispic1 (this,50,30); "onClick=" momoca_pic (this.width, this.height); "" list and
"A onclick=" chgImg ( '' '' 'fdsafsdaf'); "style='mso-footnote-id:ftn1'" # "and" various factions defended "" HSPACE=1 VSPACE=1 border=0> "title" onload= "thispic1 (this,50,30); "onClick=" momoca_pic (this.width, this.height); "" list and
"A onclick=" chgImg ( 'http://www.xymv.com/lianlian/bann.gif,' 'http://www.xymv.com/lianlian/bann.gif' 'fdsafsdaf'); "style='mso-footnote-id:ftn1'" # "and" the various factions of the party yesterday signed a "http : //www.xymv.com/lianlian/bann.gif "HSPACE=1 VSPACE=1 border=0>" title "onload=" thispic1 (this,50,30); "onClick=" momoca_pic (this.width, this.height); "" list and
"/body>
"/html>
[/html]
Http://e7358.com/art/download/test0116.htm |
|