|
|
Calculator Format You may have noticed that the calculators you have have seen on the Internet to not rely on a sequence of popup menus to input data or see results. The calculators appear on the Web page on a form complete with buttons and text boxes to type in data and display results. The form below complete with text boxes and buttons is not generated with JavaScript, but are produced as part of the HTML Page. The calculator below performs evaluates the equation Y = XN .
Simple computer Graphical User Interface (GUI)
Program for above calculator below. Copy it and run it on your computer using methods taught on previous page. <html> Note that I still use popup menus to input data. If I provided an input textbox for each input, the HTML code would become far more complex. Complex HTML code can easily be generated with a development system such as FrontPage. You can use above code as a template for any scientific calculation you would like to make. Note that the calculations had to be performed in a function that I attached to a button using the onclick statement. If this appears to be getting too complicated, you should remember that you can simply stick with inputting data using popups. Popups work fine for calculations that you do not intend to publish on the Internet.
|
|
|