PHP: about how to pass values in the Html page method in ajax

Source: Internet
Author: User
In PHP, the issue of passing values in the Html page method in ajax is found in zhuce. php page & lt; tr & gt; & nbsp; & lt; td & nbsp; width = '000000' & gt; Username: & lt;/td & gt; & nbsp; PHP about the problem of passing values in the Html page in ajax
On the zhuce. php page

User name:

Username detection

 

Question: how to use PHP methods in the checkname ('value') method to obtain the current value of the user name form and put it in the value for value transfer. Php html :?????? User name:??????
------ Solution --------------------
After reading your question, you seem to have no need to put the obtained value into the function,

function checkname(){
    var name = $(#name).val();
    $.post('url',data,function(msg){
        //....
    });
}

------ Solution --------------------
Function checkname (){
Var v = document. getElementById ('name'). value;
Alert (v );
}

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.