日期:2014-05-17  浏览次数:20429 次

获取按钮id
有两个php
第一个上面有数个button(无表单)点击某个button进入第二个php
第二个php根据点击的不同按钮执行不同操作

请问在第二个php中如何获取所点击的button 的id
PHP button id

------解决方案--------------------
可以这样传
<input type=button id='1234' onclick="location='page.php?id='+this.id">
也可以这样传
<input type=button onclick="location='page.php?id=1234'>

------解决方案--------------------
用ajax传递值