请问在display:none状态下 images.width 图片的宽高都获取不到呢!
function addIECorners() {
var theimages = getImages('corner');
var image; var object; var vml; var div; var pos; var i; var classes = '';
var iradius = null; var ishadow = null; var ishade = null; var inverse = null;
var newClasses = ''; var maxdim = null; var offset = null; var radius = null;
var display = ""; var flt = null; var width = null; var height = null;
var start, head, soft, shadow, fill, foot, end;
var left, top, bottom, right, lt, br, linear, inset;
for (i=0;i<theimages.length;i++) {
image = theimages[i];
object = image.parentNode;
classes = image.className.split(' ');
iradius = getClassValue(classes,"iradius");
ishadow = getClassValue(classes,"ishadow");
ishade = getClassValue(classes,"ishade");
inverse = getClassAttribute(classes,"inverse");
newClasses = getClasses(classes,"corner");
width = image.width; height = image.height;………………
function addIECorners() {
var theimages = getImages('corner');
var image; var object; var vml; var div; var pos; var i; var classes = '';
var iradius = null; var ishadow = null; var ishade = null; var inverse = null;
var newClasses = ''; var maxdim = null; var offset = null; var radius = null;
var display = ""; var flt = null; var width = null; var height = null;
var start, head, soft, shadow, fill, foot, end;
var left, top, bottom, right, lt, br, linear, inset;
for (i=0;i<theimages.length;i++) {
image = theimages[i];
object = image.parentNode;
classes = image.className.split(' ');
iradius = getClassValue(classes,"iradius");
ishadow = getClassValue(classes,"ishadow");
ishade = getClassValue(classes,"ishade");
inverse = getClassAttribute(classes,"inverse");
newClasses = getClasses(classes,"corner");
width = image.width; height = image.height;………………
解决方案 »
- 学习JS的方法
- Ext 文本框不可输入是那个属性呀
- 这种选择器应该怎么做?
- 动态创建一个chekbox 的onclick却在创建是自动执行.????
- 如何做边输入边自动将<select>中最适合的<option>提前?
- 不会用try catch...............
- ASP+JavaScript 关于表单提交的问题,急
- 【捉急吖】在对象引用的过程中如何使用变量?
- 如何让IE的"后退"按钮失效.
- 现在要在输入完密码以后,按回车就登陆,有办法吗?
- javascript showPaginationNavigator 何解
- prototype中 handler is undefined错误?
visibility的话只是消失,但是空还留着,你用这个属性就还在
你这种情况可以试试先把visibility设置成hidden, 取完高度后把visibility设置成show, 再设置display为None.