![]() |
|
|
|
| ||||||
|
Welcome to the The ProgrammersTalk Community forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
| Tags: |
![]() |
![]() | | LinkBack | Thread Tools | Display Modes | ![]() |
| |||
| [SOLVED] Does any one know how to program javascript temp calculator to display... ...the answer in alert dialog box? Am trying to create a temperature conversion caculator with that displays an the answer in the alert dialog box with javascript |
| |
| |||
| You need to get the value from your input box. (something like <input box name>.value). You can't do math on a string, so you must convert it to a float (parseFloat(<input box name>.value)) Now you can do math on it. 9/5*parseFloat(<input box name>.value) + 32 After that you can put it into the alert(9/5*parseFloat(<input box name>.value) + 32). |
![]() |
| Thread Tools | |
| Display Modes | |
| |