Tech
Forums
Jobs
Books
Events
Videos
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
3
Answers
How to Validate Image Height and Width Using Javascript.
Dr.Ajay Kashyap
8y
449
1
Reply
Hello..
How to Validate Image Height and Width Using Javascript. In MVC I want Height And Width Not Less Then 1000.
Height=1000.
Width=1000.
Given Below Is mY Code:-
<script>
$("#BannerPic").change(function () {
debugger;
var height = this.height;
var width = this.width;
if (height > 1000 || width > 1000) {
alert("Height and Width must not exceed 100px.");
return false;
}
return true;
});
</script>
Post
Reset
Cancel
Answers (
3
)
Next Recommended Forum
MVC WebSecurity.CreateUserAndAccount Membership.Provider err
how to iterate the object and print the property and valu