Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript check if in array

var extensions = ["image/jpeg","image/png","image/gif"];          
if(extensions.indexOf("myfiletype") === -1){
	alert("Image must be .png, .jpg or .gif");
} 
Source by softhunt.net #
 
PREVIOUS NEXT
Tagged: #javascript #check #array
ADD COMMENT
Topic
Name
2+8 =