开发者

How to multiply two numeric values inside a browser (to calculate prices) without actually refreshing page? [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 10 years ago.

My brother has a grocery store. He asked me that if I could create a website to order grocery online so he could get it home delivered.

I know HTML, CSS and a little PHP.

I wanted to ask if anyone would guide how to do calculations on a browser. Like if I am selling mangoes. I will show that price per unit weight. Than I will provide a drop down from where the buyer can choose weight. And just next to it the calculation will occur and he can get the total price he has to pay on the same page.

After that I know what to do.w开发者_如何学运维hen he presses submit I will take the total and pass it to confirmation page using header command in PHP .

Please note that I its pay on delivery site so I don't need a payment method.


You can take a look here , and I found this site which I believe is good for you as well to learn.


Why can't you just hook up a javascript event handler to the website's "calculate" or "update quantity" button for the given item and use javascript to calculate the cost for the items?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜