Je kan detecteren de hoogte van de tekst, maar u kunt de hoogte van het beeld te detecteren zoals zo
Code:
was _URL = venster.URL || venster.webkitURL;
$("#afvijlen").wijziging(functie (en) {
was afvijlen, img;
if ((afvijlen = deze.afvijlens[0])) {
img = new afbeelding();
img.onload = functie () {
alert(deze.breedte + " " + deze.hoogte);
};
img.src = _URL.createvoorwerpURL(afvijlen);
}
});
-------------------------------------------------------------------------
(in het Engels)
You cant detect the height of text, but you can detect the height of an image like so
Code:
var _URL = window.URL || window.webkitURL;
$("#file").change(function (e) {
var file, img;
if ((file = this.files[0])) {
img = new Image();
img.onload = function () {
alert(this.width + " " + this.height);
};
img.src = _URL.createObjectURL(file);
}
});
Also anyone else reading this in English, Yammaski wants an alert to pop up when the text gets too big using a dropdown. So like if one option is to have the text at 12em another at 15em and one at 20em, an alert would show up at 20em because that text is too big. It is really hard for me to put my ideas down on this post, let alone to program the javascript, but I hope I can try to help.
Bookmarks