为什么form传不了参数?

来源:百度知道 编辑:UC知道 时间:2024/06/19 03:40:05
<form name="form1" method="post" action="editphp.php" target="_blank">
<div style="margin-left:10px;">标题:<br /><input name="title" type="text" width="65" value="abc" /></div>
<div style="margin:10px 0 0 10px;">内容:<br /><textarea name="content" rows="30" cols="103">abc</textarea></div>
<div><input type="submit" value="保存" style="float:right; margin:10px 40px 0 0;" /></div>
</form>
为什么这段代码我传过去的时候在地址栏总是看不到有参数出现的 哪里错了 请明示 谢谢!!

因为你form的method是post,你可以改成get就可以在地址栏看到xxx.php?xxx=xxx之类的了

不是传不了参数,而是传了你没注意,你method="post" ,是以form形式隐性传值,要在地址栏里显示,改成 method="get"。