1

可能重复:
如何将 JavaScript 变量传递给 PHP?

如何获取不在标签内的<form>变量

var vvv = document.getElementById('vvv'); 

进入php

$variable=vvv.value;
4

1 回答 1

5

I suspect you talk about javascript to php variable. To understand how this works you will probably need to use AJAX. This is a good start: JQuery AJAX

Once you get a hold of that you can send your javascript-variable to a PHP-webservice and have fun with it.

于 2012-10-10T12:43:45.027 回答