<div class="container"> <div class="calculator"> <form> <div class="display"> <input type="text" name="display" disabled> </div> <div> <input type="button" value="AC" onclick="display.value =''" class="ac"> <input type="button" class="del" value="Del" onclick="display.value =display.value.toString().slice (0,-1)"> <input type="button" class="symbols" value="." onclick="display.value +='.'"> <input type="button" class="symbols" value="/" onclick="display.value +='/'"> </div>
Question
<div class="container"> <div class="calculator"> <form> <div class="display"> <input type="text" name="display" disabled> </div> <div> <input type="button" value="AC" onclick="display.value =''" class="ac"> <input type="button" class="del" value="Del" onclick="display.value =display.value.toString().slice (0,-1)"> <input type="button" class="symbols" value="." onclick="display.value +='.'"> <input type="button" class="symbols" value="/" onclick="display.value +='/'"> </div>
Solution
Sure, I understand. However, you haven't asked a question or given a task related to the HTML code you provided. Could you please provide more details or ask a specific question?
Similar Questions
Create a mini calculator application, which has following functionalitiesAdditionSubtractionDivisionMultiplicationYour app should haveTwo input boxes which should take two numbers from the user.Four Buttons with following text contentAddSubtractDivideMultiplyWhen user enter 2 and 4 and clicks on multiply button, an alert should come with 8 as ansWhen user enter 8 and 4 and clicks on Divide button,an alert should come with 2 as ans
Which of the following buttons clear the Casio fx-260 display window and the last function entered on the calculator?FUNCTION"AC"SHIFT"C"
The issue with your code is that you are not assigning any values to `num1` and `num2` in the `addAndSubtract` object. In order to inherit these values in the `calculator` object, you need to assign them first. You can do this by adding the following lines of code:```javascriptcalculator.num1 = addAndSubtract.num1;calculator.num2 = addAndSubtract.num2;```By doing this, the `calculator` object will have access to the values of `num1` and `num2` defined in the `addAndSubtract` object, and the `subtract()` and `product()` methods will return the correct results.
rt 2Make the following variables (all of them should be OUTSIDE OF EVERY FUNCTION ON TOP OF MAIN.JS), along with the variables I left for you containing images: computerNumber, start it with -1 or any other numberdefine a function and attach it to each of your buttons (and/or to the user hitting the enter key). Call it takeTurn. This function should take a parameter. 1 for rock, 2 for paper, 3 for scissors:each button should have a function call with a different number passed in as a parameter based on how the function should expect numbersIn the function, reassign computerNumber to a random number between 1 and 3 (use randomInt() )Also put two alerts, one to show the user's number (representing which button they pushed) and one to show the computer's random numberYou are done when the alert in the function works correctly
Make the following variables (all of them should be OUTSIDE OF EVERY FUNCTION ON TOP OF MAIN.JS), along with the variables I left for you containing images: computerNumber, start it with -1 or any other numberdefine a function and attach it to each of your buttons (and/or to the user hitting the enter key). Call it takeTurn. This function should take a parameter. 1 for rock, 2 for paper, 3 for scissors:each button should have a function call with a different number passed in as a parameter based on how the function should expect numbersIn the function, reassign computerNumber to a random number between 1 and 3 (use randomInt() )Also put two alerts, one to show the user's number (representing which button they pushed) and one to show the computer's random numberYou are done when the alert in the function works correctly
Upgrade your grade with Knowee
Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.