web前端|js教程
javascript
web前端-js教程
清新博客首页源码,vscode常用node插件,ubuntu 进root,tomcat内存设置依据,jupiter爬虫,php 第三方类库,谷歌 seo 外贸 网站模板,小米视频的网站模板,小程序网页模板lzw
获取图片大小:
淘金农场源码下载,vscode多文件夹工作区,Ubuntu要退出,tomcat服务器入门,requests爬虫豆瓣,上海php培训哪家好,湘潭百度seo优化报价lzw
var originImage = new Image();function GetImageWidth(oImage) { if (originImage.src != oImage.src) originImage.src = oImage.src; return originImage.width;}function GetImageHeight(oImage) { if (originImage.src != oImage.src) originImage.src = oImage.src; return originImage.height;}
课件管理asp源码,vscode创建c 工程,ubuntu连ipad,tomcat启动加密,sqlite支持多线程吗,web前端框架展示一万条数据,阿里云防爬虫安全产品,php上传图片mysql,政和企业seo排名,最好的php网站管理系统,网页qq登录源码下载,小区通知栏模板lzw
图片等比缩放:
function SetImage(ImgD, FitWidth, FitHeight) { var image = new Image(); image.src = ImgD.src; if (image.width > 0 && image.height > 0) { if (image.width / image.height >= FitWidth / FitHeight) {if (image.width > FitWidth) { ImgD.width = FitWidth; ImgD.height = (image.height * FitWidth) / image.width;} else { ImgD.width = image.width; ImgD.height = image.height;} } else {if (image.height > FitHeight) { ImgD.height = FitHeight; ImgD.width = (image.width * FitHeight) / image.height;} else { ImgD.width = image.width; ImgD.height = image.height;} } }}