How to use JS to pass parameters to PHP files

Source: Internet
Author: User
Just learning PHP
wrote a landing page in the landing page with JS to determine whether the password is empty prompt code now want to pass the password of the input account to the PHP verification page do not know what should be written please give us guidance

This is the code






The account number or password cannot be empty!
Account

Password





Reply to discussion (solution)

No refresh verification, search Ajax.
Jump to PHP side verification, submit the form directly.

No refresh verification, search Ajax.
Jump to PHP side verification, submit the form directly.

If you use form, JS will lose its function.

Not ah, first JS verification, and then upload to PHP verification.

Use form to pass directly to the PHP verification page
Or did I write the wrong one?

Use form to pass directly to the PHP verification page
Or did I write the wrong one?

function Check () {
Validation succeeded return true; failed return false;
}

Post the code to see

  • 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.