This code i put it in the HTML page for check the file value, and I want to add some secure values in the code
I need to edit this code:
<script>
window.onload = function () { var form = document.getElementById('forms'),
imageInput = document.getElementById('img1');
form.onsubmit = function () {
var isValid = /\.jpe?g$/i.test(imageInput.value);
if (!isValid) {
alert('Non allowed!');
}
return isValid; }; };
</script>
I need to add more file values, like: gif, png, pdf, psd, etc.
Use OR
Example: