Just trying to make a simple calculator in javascript. When I try to run it, nothing happens. I assume its something really simple, but I just can’t figure it out. Any ideas? I appreciate your help.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Your regex is malformed; missing a
/. And you have closing html tags in the middle of all your stuff (instead of at the end). And you call CalcMortage and attach the results as the click handler, rather than the method itself (because of the closing()inonclick = CalcMortgage();). And you force multiple digits in the regex (like I can’t put “5” for percentage).Other than that it’s fine.