日期:2014-05-16 浏览次数:20357 次
<div id="aaa"></div>
<div id="ccc" style="display:none;"><img src="http://www.csdn.net/css/logo.png" id="eee" /></div>
<script language="javascript">
$(document).ready(function(){
var theImage = new Image();
var iurl = $("#eee").attr("src");
var fk = 0,fg = 0;
theImage.src = iurl;
$("#aaa").load(iurl,function(){
fk = theImage.width;
fg = theImage.height;
if(fk == 0){
fk = 500;
fg = 300;
};
};
$("#aaa").html(fk);
});
</script>
var screenImage = $(this).find('img');
theImage.src = screenImage.attr("src");
var imageWidth = theImage.width;
var imageHeight = theImage.height;
$(document).ready(function () {
var theImg = new Image();
theImg.src = $("#aaa").attr("src");
var ss = $("#aaa").attr("height");
alert(theI