منتخب بازارچه

ببخشید این نسخه جدیدی از برنامه تبدیل ارز است ظاهرا نسخه قبلی خوانا نیست.می بخشید

star75

کاربر تازه وارد
This programe does not work.I thank you so much if you help me.



Get the currencyrate
Get the amount
Show result= var result
Show currencyrate =currencyrate
fonction convert = convert & verify, if we filled in all the fields & if not, it focus on it untill we fill it in .

<html>

<head>
<title>.</title>

<script language="javascript">
<!--

var change,currency,amount,result;

fonction convert(){
change=window.document.conversion.change.value;
currency=window.document.conversion.currency.value;
amount=window.document.conversion.amount.value;

if(window.document.conversion.change.value="false")
alert("choose one of the option");
window.document.conversion.change.focus();
if(window.document.conversion.currency.value="null")
alert("Choose one of the option");
window.document.conversion.currency.focus();
if(window.document.conversion.amount.value="null")
alert("Enter amount");
window.document.conversion.amount.focus();


if(change=1){
result=amount* currency;
}
else{
résultatresult= amount/ currency;
}

window.document.conversion.result=result;
window.document.conversion.currencyrate = currency;
}
//-->
</script>
</head>
<body>

<h1>Convert currency</h1>
<h3>Type of favorite conversion :</h3>

<form name="conversion">

<input type="radio" name="change" value="1" >Other currency to $Can
<br>
<input type="radio" name="change" value="2" checked >$Can to other currency
<br>
<br>
<table>
<tr>
<td>
Currency:
</td>
<td>
<select name="currency">
<option value="1.27">Dollar Américain</option>
<option value="0.91">Dollar Australien</option>
<option value="0.01">Yen Japonais</option>
<option value="0.18">Couronne norvégienn</option>
<option value="0.04">Ruble Russe</option>
<option value="0.17">Couronne Suédoise</option>
<option value="0.01">Franc Suisse</option>
<option value="0.33">Ringgit malaisien</option>
<option value="2.30">Lire Sterling</option>
<option value="0.11">Peso Mexicain</option>
</select>
</td>
</tr>
<tr>
<td>
Convert amount:
</td>
<td>
<input type="text" name="amount" size="20">
</td>
</tr>
<tr>
<td>
Result:
</td>
<td>
<input type="text" name="Result" size="20" disabled >
<td>
</tr>
<tr>
<td>
Currency rate:
</td>
<td>
<input type="text" name="currencyrate" size="10" disabled >
</td>
</tr>

</table>

<input type="button" name="convert_button" value="Convert" onclick="convert()" >
<br>
<input type="Reset" name="reset_button" value="Reset">
</form>
</body>
</html>​
 
بالا