Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Converting Values
Message
De
24/01/2002 14:11:53
 
Information générale
Forum:
Java
Catégorie:
Autre
Divers
Thread ID:
00609082
Message ID:
00609970
Vues:
20
Please note that JavaScript is not Java. They are very different languages. This posting is in the wrong forum. To answer your question: http://wsabstract.com/javatutors/round.shtml

>How can I convert or trim a value? The following represents a script running on a server that acepts a temperature value from a device in Celceus. I am converting to 'F'. I have no contol over the value exept but to read it. and it is returning a DOUBLE I only need to two decimal places... Help.
>
>
><!-- JavaScript used for temperature conversion -->
><SCRIPT LANGUAGE="JavaScript">
>	function TempDisplay(Room, RoomTemp)
>	{
>		var Temp = RoomTemp;
>		var TempF = ((Temp*1.8)+32);
>		document.write("The " + Room + " Temperature is " + TempF + "° F");
>	}
></script>
>
><SCRIPT>
>     TempDisplay("Computer Lab", "<iLonWeb FUNCTION=ShowValue SYMBOL=NVL_RmTemp > </iLonWeb>");
></script>
>
>
>it is returning 72.260....01
>
>Thank you in advance for your assistance...
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform