mirror of
https://github.com/BreizhHardware/iris.git
synced 2026-01-18 16:57:20 +01:00
19 lines
600 B
JavaScript
19 lines
600 B
JavaScript
function checkFeatures() {
|
|
nbFeatures = 0
|
|
if (document.forms["features"]["sepal-length"].value != '') {
|
|
nbFeatures = nbFeatures + 1 ;
|
|
}
|
|
if (document.forms["features"]["sepal-width"].value != '') {
|
|
nbFeatures = nbFeatures + 1 ;
|
|
}
|
|
if (document.forms["features"]["petal-length"].value != '') {
|
|
nbFeatures = nbFeatures + 1 ;
|
|
}
|
|
if (document.forms["features"]["petal-width"].value != '') {
|
|
nbFeatures = nbFeatures + 1 ;
|
|
}
|
|
if (nbFeatures < 2) {
|
|
alert("Waring: You need to put at least 2 characteristics.");
|
|
return false ;
|
|
}
|
|
} |