JS的变量的值怎么传递给PHP的变量?

get:

<script>
name="xxx";
window.location='xxx.php?name='+name;
</script>

post:

<script>
name="xxx";
</script>
<form name=form1 method=post onsubmit="this.name.value=name">
<input type=hidden name="name">
</form>

猜你喜欢

转载自blog.51cto.com/13304060/2386717