[英]how to set image height and width?
我想要一个信息,我们将如何使用javascript设置恒定的图像高度和宽度,如果我们将高度和宽度设置为50和65,以便在用户开始插入多个条件的情况下仅插入那么多尺寸的图像,一条警报消息会通过iam编写代码,不行
if((obj.FileUp.value.width>67)&&(obj.FileUp.value.height>380))
{
alert("Height of image should not be more than 67 And Width of image should not be more than 380");
return false;
//alert(obj.FileUp.width)
}
我不认为您可以直接在javascript中与上传的文件进行交互。
您可以使用Flash上载插件(例如Plupload) ,也可以检查服务器上的大小,尽管我猜这可能会达到目的。
我发现此页面似乎是您需要的示例:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.