本文介绍了计算脚本显示在同一页面上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




这里第一次在Java部分。


我有一个HTML表单和一个PHP脚本来做一个简单的计算,但它必须带我到一个不同的页面的结果。


计算器非常简单。用户只输入高度宽度,计算器应用公式,然后显示答案,精确到10日。


[ PHP]

< ;?


$ cost =(($ _ REQUEST [" height"] * $ _ REQUEST [" width"])+ 160)* 1.65);


echo"< br />佣金的成本为$ .round($ cost,-1);


?>

[/ PHP]


我对Java脚本一无所知。有人可以指出我正确的方向来进行这个计算并在用户输入数据的同一页面上显示它吗?


谢谢!!


Michael

Hi,

First time in the Java section here.

I have an HTML form and a PHP script to do a simple calculation but it has to take me to a different page for the results.

The calculator is really simple. The user enters just height and width and the calculator applies the formula, then display the answer to the nearest 10th.

[PHP]
<?

$cost=((($_REQUEST["height"]*$_REQUEST["width"])+160)*1.65);

echo "<br />The cost of the commission will be $" .round($cost, -1);

?>
[/PHP]

I know nothing of Java script. Can someone point me in the right direction for a script that will do this calculation and display it on the same page as the user inputs the data?

Thank you!!

Michael

推荐答案




这篇关于计算脚本显示在同一页面上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-07 09:56