javascript - Select different packages to display corresponding prices for products
为情所困
为情所困 2017-05-16 13:12:00
0
7
741

The three prices below the picture are the three package prices. I want to realize that by clicking on any of the three package prices, the default price of 980 above will also change. . How to implement it in JS?
< /p>

为情所困
为情所困

reply all(7)
阿神

Can I understand that this is a tab switch? When you click on the current color, you get the price above and put it below?

我想大声告诉你

Give you ideas

Add the corresponding price to each color block
Get the price when you click it, and then replace the price on the title.

All are implemented by the front end.

世界只因有你

ajax. Click once to request once.

洪涛

Different specifications display different prices. It should be that when the page is loaded, the prices of different specifications of all products have been obtained. When users click on different specifications, they only need to switch the data. There is no need to obtain it in the background, which puts a lot of pressure on the server. , the experience is not good, just one price data, right? And after the product is put on the shelf, the price is generally not allowed to be modified, unless the lower level is re-edited and then put on the shelf. However, the final price must still be based on the backend, which needs to verify the price. Effectiveness. The specific implementation should be to put the price of the modified product on the specification label attribute when initializing the specifications.

我想大声告诉你

Isn’t it very convenient to use emmy_’s method and jquery’s data-*?

巴扎黑

Multi-dimensional implementation http://www.cnblogs.com/puredi..., your single-dimensional one is even simpler

给我你的怀抱

It must be ajax in the official project

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template