A simple program to ask the user to give US Dollar value and convert into Philippine Peso equivalent using JavaScript programming language.

I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me at the following email address for further details.  If you want to advertise on my website, kindly contact me also at my email address also. Thank you.

My email address is jakerpomperada@gmail.com and jakerpomperada@yahoo.com

My mobile number here in the Philippines is 09173084360.

Program Listing

<html>
   <title>US Dollar To Philippine Peso in JavaScript  </title>
 <style type="text/css">

 body {

 	font-family: arial;
 	font-weight: bold;
 	font-size:15px;
 	 }
 
 form
{
  display: inline-block;
  background-color: lightblue;
  padding: 6px;
}

label{
  display: block;
  direction: rtl; 
}

input{
  direction: ltr; 
}

label::after{
  content: attr(data-text);
}
 </style>

<script language="JavaScript">

function PesoConverter(){
document.converter.peso.value = (document.converter.us.value * 49.86).toFixed(2);

}


function Clear() {
document.converter.us.value ="";
document.converter.peso.value="";
document.converter.us.focus();
 
}

function About() {
	alert("Created By Prof. Jake R. Pomperada, MAED-IT, MIT");
	document.converter.us.focus();
 
}

</script>
<body>
<br>
<h3>US Dollar To Philippine Peso in JavaScript </h3>
<form name="converter">
<label data-text="US Dollar">&nbsp;&nbsp;	
<input type="text" name="us" onChange="PesoConverter()" required="">
</label>
<br />
<label data-text="Philippines Peso">&nbsp;&nbsp;
<input type="text" name="peso"  required="">
</label>

<br /> <br>
<input type="button" value="Convert" title="Click here to convert." />
<input type="button" value="Clear"  
title="Click here to clear the text box."
onclick="Clear()"/>
<input type="button" value="About"  
title="Click here to know about the program."
onclick="About()"/>
</form>
</body>
</html>

Leave a Reply

Your email address will not be published. Required fields are marked *