Difference between revisions of "User talk:SteveBaker"

From Wikiid
Jump to: navigation, search
(BR)
Line 1: Line 1:
<SCRIPT LANGUAGE="JavaScript">function convertIt() { var centy=0; centy=document.Converter.centigrade.value; document.Converter.faren.value=centy*9/5+32;}</SCRIPT>
+
<SCRIPT LANGUAGE="JavaScript">function convertCtoF() { var centy=0; centy=document.Converter.centigrade.value; document.Converter.faren.value=centy*9/5+32;}  function convertFtoC() { var centy=0; centy=document.Converter.faren.value; document.Converter.centigrade.value=(centy-32)*5/9;}</SCRIPT>
  
 
is called when the user moves out of the centigrade input box (onBlur):
 
is called when the user moves out of the centigrade input box (onBlur):
  
 
<form name="Converter">
 
<form name="Converter">
Enter the Centigrade temperature: <input type=text name="centigrade" size=10 onblur="convertIt()"><br>
+
Enter the Centigrade temperature: <input type=text name="centigrade" size=10 onchange="convertCtoF()"><br>
 
View the Farenheit temperature: <input type=text name="faren" size=10><br>
 
View the Farenheit temperature: <input type=text name="faren" size=10><br>
</form>
+
</form>
 
+
<center onClick="alert('You will soon go to the next page')">HELLO!</center>
+

Revision as of 18:29, 23 November 2007

<SCRIPT LANGUAGE="JavaScript">function convertCtoF() { var centy=0; centy=document.Converter.centigrade.value; document.Converter.faren.value=centy*9/5+32;} function convertFtoC() { var centy=0; centy=document.Converter.faren.value; document.Converter.centigrade.value=(centy-32)*5/9;}</SCRIPT>

is called when the user moves out of the centigrade input box (onBlur):

<form name="Converter"> Enter the Centigrade temperature: <input type=text name="centigrade" size=10 onchange="convertCtoF()">
View the Farenheit temperature: <input type=text name="faren" size=10>
</form>