Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Zoopy
Aug 31, 2002

"HAT."
I am taking a javascript class online with a really awful teacher and really awful course materials.. I swear to loving god she is asking us to do things she hasn't taught us.

I have this really simple problem and I am having a hard time finding the information on how to solve it.

It's basically a form, you enter a number and push a button and it prints the number +5*2-7.

This is the page she gave us:
code:
<html>
  <head>
    <script type="text/javascript">
      // add your function definitions here
    </script>
  </head>
  
  <body>
    <form id="mathForm" name="mathForm">
      <p>Enter the number here:&nbsp;&nbsp;<input type="text" id="num" /></p>
<p>
        <input type="button" value="Do the Math" 
        onclick="//get data; call function"
        />
      </p>
      <p>Answer:&nbsp;<input type="text" id="answer" /></p>
    </form>
  </body>
</html>
I'm not asking for someone to do my homework for me but maybe point me in the right direction of the information required to do this...I've googled and searched and read. I guess I am mostly confused on how javascript receives and prints out data into forms.

Adbot
ADBOT LOVES YOU

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply