在项目开发中经常见到不同页面之间传值在web工作中,本篇文章给大家列出了三种常见的方式。
接触PHP也有几个月了,本文总结一下这段日子中,在编程过程里常用的3种不同页面传值方法,希望可以给大家参考。有什么意见也希望大家一起讨论。
一. POST传值
post传值是用于html的<form>表单跳转的方法,很方便使用。例如:
- <html>
- <form action='' method=''>
- <input type='text' name='name1'>
- <input type='hidden' name='name2' value='value'>
- <input type='submit' value='提交'>
- </form>
- </html>
新闻热点
疑难解答