Using Javascript, how I compare to values to see if they are divisible by each other? : I am trying to write a event handler here so that when users enter a number in the first text box and the second text box, and click "Compare Values" button, a function executes and it checks

if either of the number is ZERO, it prints out on "box5", "You have entered zero" 

if the two numbers are the same, it prints out on "box5", "The numbers are the same"


If the first number is evenly divisible by the second, it prints out on "box5", "The first is divisible by the second"


if the second number is evenly divisible by the first, it prints out on "box5", "The second is divisible by the first"

else-if the numbers do not divide into each other, it prints out on "box5", "They are not divisible"

I've already created the HTML page for this but I do not know how I should approach this. A few users have told me to use the "keyup" method and I was hoping if someone could show me an example of the way they would approach this using the "keyup" method if that is possible. Thanks in advance

    <p> Enter two numbers and we will tell you if they are evenly divisble
    <p> Enter your first number:</p> <input type="text" id="box3">
    <p> Enter your second number: </p> <input type="text" id="box4"> 
    <button id="compareValue">Compare Values</button>
    <p> Output will appear here: </p> <input text="type" id="box5" disabled>

I am just trying to create a simple tool to compare 2 numbers entered by a user, and check to see if they are divisible, and if they are, which number is divisible by which one, and to make sure that no ZERO is entered in the input, and else-if nothing is divisible by each other, then it tells you they are not divisible. 

