在DXImageTransform.Microsoft.AlphaImageLoader之后获取图像高度 [英] Get image height after DXImageTransform.Microsoft.AlphaImageLoader
问题描述
这是我的代码
CSS
.upld
{
过滤器:progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod =图像);
HTML
< input type ='file'onchange =getIt(this,'divImgTop1')/> < br />
< div class =upldid =divImgTop1>< / div>
javascript
function getIt(t,id){
var divShw = document.getElementById(id);
divShw.filters.item(DXImageTransform.Microsoft.AlphaImageLoader)。src = t.value;
divShw.style.width =100px;
divShw.style.height =100px;
}
代码工作正常,图像显示。
问题
我如何找到显示图片的高度?
我们只需要在 然后 会给图像的高度:) I have to show Images selected in File Upload conrtor before Submitting to the page. Here is my code CSS HTML javascript code is working fine and the image gets displayed. Question
How can i find the height of the image displayed ? we need only to make then will give the height of the image :) 这篇关于在DXImageTransform.Microsoft.AlphaImageLoader之后获取图像高度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋! div 上设置
position:absolute
$('#divImgTop1')。height )
.upld
{
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=image);
}
<input type='file' onchange="getIt(this,'divImgTop1')" /> <br />
<div class="upld" id="divImgTop1"></div>
function getIt(t,id) {
var divShw = document.getElementById(id);
divShw.filters.item("DXImageTransform.Microsoft.AlphaImageLoader").src = t.value;
divShw.style.width = "100px";
divShw.style.height = "100px";
}
position:absolute
on each div
$('#divImgTop1').height()