+ 1
how to apply js on specific place?
how to get the input from the textbox and the apply some javascript on it like if get a number from user return the result odd or even??? how to do this ??
1 Réponse
+ 1
first you use document.getElementById("yourTextboxID").value
to get the value of the textbox,
after that you you use modulo to check if the number is even or not
function isOdd(num) { return num % 2;}