jquery获得图片的原始尺寸
2016-03-21 11:13
811 查看
Get on screen image var screenImage = $("#image"); // Create new offscreen image to test var theImage = new Image(); theImage.src = screenImage.attr("src"); // Get accurate measurements from that. var imageWidth = theImage.width; var imageHeight = theImage.height;
相关文章推荐
- jquery获取图片原始尺寸 (高度与宽度)示例
- 分享 13 个帮助你简化开发的 jQuery 插件
- 用jquery控制图片的最大宽度
- jQuery中的$(window).load()与$(document).ready()
- jquery.lazyloading图片延迟加载插件,通用
- jquery 判断图片加载完毕例子
- jquery中this与$(this)的用法区别.
- 简单的jquery tab切换代码
- jquery获得location的传值 和一些滚动效果243dede
- 用jquery实现滚动浏览器滚动条加载数据(类似于腾讯微博) [复制链接]
- jquery 滚动,或点击,加载文章
- innerHTML与jquery里的html()区别介绍
- Jquery下判断Id是否存在
- jquery中的$(function(){...})什么时候执行
- jquery让div中所有的a标签的target属性为“_blank”
- jquery 实现iframe 自适应高度
- jQuery - last-child 选择所有最后一个子元素 last最后一个元素
- $jquery.ajax 访问数据库 php html 等。
- jquery 选择奇偶行。
- JQuery中$.ajax()方法参数详解