N
N
nickname133842019-04-05 18:56:51
JavaScript
nickname13384, 2019-04-05 18:56:51

How can I get the height and width of the uploaded image?

You need to validate the uploaded image. To do this, you need to get its height and width
(for example, height and width should not exceed 400px )

<form>
  <input type="file">
</form>

tried to use e.target.height writes height 0px
You can use only javascript, without jquery

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Spirin, 2019-04-05
@nickname13384

for example

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question