Set a button, click on the self-increment

Source: Internet
Author: User
I want to set the number of items in the shopping cart as a button, and automatically add them by clicking on them.
How to write this PHP language.


Reply to discussion (solution)

This is best to use JS to write, PHP can use AJAX+JS to achieve click Self-increment

To use JS to write AH button binding an event Click to trigger the self-increment event

This is the effect of jquery, it's nothing to do with PHP.
Http://www.cnblogs.com/wifi/articles/2587746.html

This should be written in JS. Last submitted to PHP

Js:

Form:

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.