JS is the language of the front desk, PHP is the background of the language, beginners will often appear before and after the Taiwan Division of the situation (I was so, and now sometimes committed), my original idea is to put the front and back as two islands, they can not cross, HTML is like a bridge, When you want to spread a variable on an island to another island, only with the help of this bridge.
Let me make a small summary:
How to upload the value of 1:html to JS, the following assumption is file 1.php
Copy CodeThe code is as follows:
JS If you want to take the text box user input name value, so write
Copy CodeThe code is as follows:
In this case, a call to JS get () will pop up the warning box, the content is the name of the value.
2: If the JS in the name of the value to be passed back to the Rename text box, so write
Copy CodeThe code is as follows:
In this case, calling get () below will automatically display the value you entered on the name above.
3:php The value of the page
I think everybody's going to do it.
Copy CodeThe code is as follows:
$name =$_request["username"];
Echo $name;
?>
4:php value returned to page
Insert the PHP language in HTML, you can call the value of the variables in PHP, also available smarty (recommended).
With these, both the value of the HTML page or the value of the variable in JS can be easily passed to PHP, of course, the value of PHP can also be uploaded to the desired place.
http://www.bkjia.com/PHPjc/327851.html www.bkjia.com true http://www.bkjia.com/PHPjc/327851.html techarticle JS is the language of the front desk, PHP is the background of the language, beginners will often appear before and after the platform of the situation (I was so, and now sometimes committed), I was the original idea is to put the former ...