Files
Business-credit-asistant/public/js/js.input.validation.js
2026-06-29 13:00:18 +06:00

32 lines
727 B
JavaScript
Vendored

/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
function onlyInteger(elem) {
var result = true;
var value = event.which;
if (value < 48 || value > 57) {
result = false;
}
return result;
}
function imageShow(element,img){
var file = event.target.files[0];
if(file.type.match(/image.*/)) {
var imgInp = element;
var blah = document.getElementById(img);
const [file] = imgInp.files
if (file) {
blah.src = URL.createObjectURL(file)
}
}
}