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 );
}