-

2011年8月3日星期三

Help needed in HTML/JS/PHP I don't know which this is!?

-Can someone give me a Javascript/HTML/PHP code if i need a button and a quantity box, but the point is, when i click the button, i want the quantity to be increased by one. So one/click. And the hard part, which I can't figure out : I want the value to stay the same even if I refresh the page.

So I click it, the value's 2 now, I refresh and it remains two.



Is it possible?

Thanks in advance!

Zoli.Here is your JavaScript -- http://jsfiddle.net/xVrpb/



UPDATE: Sorry, I didn't read the rest of your description. This one saves. -- http://jsfiddle.net/rSKYm/I'm not going tio make it that easy, but have the submit button call a js function that grabs the input from the forms object and updates it. From the same function use an httprequest to set a php session variable with the new value in it, when the page is loaded any time, check if the session variable exists and populate the input box with the variable..



Not alot of code but better to learn than be told, google magic.

没有评论:

发表评论