PDA

توجه ! این یک نسخه آرشیو شده میباشد و در این حالت شما عکسی را مشاهده نمیکنید برای مشاهده کامل متن و عکسها بر روی لینک مقابل کلیک کنید : نیازمند راهنمایی در صحیح بودن کد های html



farnood
October 13th, 2014, 00:08
با سلام خدمت کاربران

کد های زیر که نوشته شده که ممکنه مشکلی داشته باشند و از دوستانی که وارد به کد های اچ تی ام ال هستن خواهشمندم کد های زیر را بررسی کنند تا اگر ایرادی داشته بنده را راهنمایی کنند.





<head>
<script>


function calculate(length, width, dollar)
{
alert(dollar.value * length.value) + ((width.value + 10% ) * 16000);
}
</script>
</head>
<body>


<form name="frm">
<table>
<tr>
<td>وزن بلبرینگ</td>
<td><input type="text" name="len" /></td>
</tr>


<tr>
<td>فی دلار با تخفیف</td>
<td><input type="text" name="wid" /></td>
</tr>


<tr>
<td>قیمت دلار امروز</td>
<td><input type="text" name="dollar" /></td>
</tr>


<tr>
<td><input type="button" name="Submit" value="Submit" onClick="calculate(document.frm.len, document.frm.wid, document.frm.dollar)"/></td>
</tr>
</table>
</form>


</body>
</html>

alborzhost
October 13th, 2014, 02:03
سلام ,

کد شما اصلاح شد فقط در فرمول شک داریم که اگر فرمول رو شفاهی بدید اون هم درست میشه.


<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<script type="text/javascript">
function calculate(length, width, dollar) {
alert((dollar.value * length.value) + (((width.value + 10) / 100) * 16000));
}
</script>
</head>
<body>
<form name="frm">
<table>
<tr>
<td>وزن بلبرینگ</td>
<td><input type="text" name="len"/></td>
</tr>


<tr>
<td>فی دلار با تخفیف</td>
<td><input type="text" name="wid"/></td>
</tr>


<tr>
<td>قیمت دلار امروز</td>
<td><input type="text" name="dollar"/></td>
</tr>


<tr>
<td><input type="button" name="Submit" value="Submit"
onClick="calculate(document.frm.len, document.frm.wid, document.frm.dollar)"/></td>
</tr>
</table>
</form>

</body>
</html>

farnood
October 13th, 2014, 02:40
سلام ,

کد شما اصلاح شد فقط در فرمول شک داریم که اگر فرمول رو شفاهی بدید اون هم درست میشه.


<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<script type="text/javascript">
function calculate(length, width, dollar) {
alert((dollar.value * length.value) + (((width.value + 10) / 100) * 16000));
}
</script>
</head>
<body>
<form name="frm">
<table>
<tr>
<td>وزن بلبرینگ</td>
<td><input type="text" name="len"/></td>
</tr>


<tr>
<td>فی دلار با تخفیف</td>
<td><input type="text" name="wid"/></td>
</tr>


<tr>
<td>قیمت دلار امروز</td>
<td><input type="text" name="dollar"/></td>
</tr>


<tr>
<td><input type="button" name="Submit" value="Submit"
onClick="calculate(document.frm.len, document.frm.wid, document.frm.dollar)"/></td>
</tr>
</table>
</form>

</body>
</html>


با سلام
ممنون از راهنمایی شما فرمول شفاهی به صورت زیر است:
(fee dolar * gheymate dolar) + ((vazn + 10%)*16000)