高手请进:javascript控制图片的问题 在限制情况下如何保持图片品质不变 这个问题我回过几次了.----------个性签名--------------http://www.esoftnow.com/bbs 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 把你上面的函数换成下面我这个:function DrawImage(ImgD){ var image=new Image(); image.src=ImgD.src; if(image.width>0 && image.height>0){ flag=true; if(image.width/image.height>= 125/115){ if(image.width>125){ ImgD.width=125; ImgD.height=(image.height*125)/image.width; }else{ ImgD.width=image.width; ImgD.height=image.height; } ImgD.alt=image.width+"×"+image.height; } else{ if(image.height>115){ ImgD.height=115; ImgD.width=(image.width*115)/image.height; }else{ ImgD.width=image.width; ImgD.height=image.height; } ImgD.alt=image.width+"×"+image.height; } } } javascript实现软键盘技术 怎麼將這個變量內容追加到一個<select>標簽的後面 有学javascript的好书不 急,关于拖动对象的问题!请大家帮忙 用javascript怎么获取目标的属性值? js数字转换千分位的问题 请教:下面的代码在什么时候会执行到 result = true; 怎样控制输入的文本框中必须是“数字”?而不是字母?在线等。。。。。 怎么在js中 再调js 我要返回,怎么办 关于正则表达式 我想做一个隔1分钟触发一次网页的按钮动作怎么做?
function DrawImage(ImgD){
var image=new Image();
image.src=ImgD.src;
if(image.width>0 && image.height>0){
flag=true;
if(image.width/image.height>= 125/115){
if(image.width>125){
ImgD.width=125;
ImgD.height=(image.height*125)/image.width;
}else{
ImgD.width=image.width;
ImgD.height=image.height;
}
ImgD.alt=image.width+"×"+image.height;
}
else{
if(image.height>115){
ImgD.height=115;
ImgD.width=(image.width*115)/image.height;
}else{
ImgD.width=image.width;
ImgD.height=image.height;
}
ImgD.alt=image.width+"×"+image.height;
}
}
}