传递两个参数到php页面为什么只能成功传递一个?请高手测试~

yiciyuanzl 2010-10-16 05:41:34
test2.html的代码

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" " http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">
<html xmlns=" http://www.w3.org/1999/xhtml ">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<script language="javascript">
function send(){
var test1=document.getElementById("text").value;
var test2=document.location.href;
alert(test1);
alert(test2);
document.location.href='test2.php?test1='+test1+'&test2='+test2;


}

</script>
</head>

<body>
<input type="text" id="text" value="ssss" />
<input type="button" onclick="send();" />
</body>
</html>



test2.php的代码

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>


</head>

<body>
2
<input type="text" disabled="disabled" value="<?php echo $_GET['text1']?>" />
<input type="text" disabled="disabled" value="<?php echo $_GET['test2']?>" />


</body>
</html>


发现只能传一个参数,test1的参数怎么都传不过来,请问是怎么回事??
...全文
69 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
yiciyuanzl 2010-10-16
  • 打赏
  • 举报
回复
那个字符有问题???我对着看,都没看出来!!!!!!!
r3r4r8 2010-10-16
  • 打赏
  • 举报
回复
<input type="text" disabled="disabled" value="<?php echo $_GET['text1']?>" />

考眼力
<input type="text" disabled="disabled" value="<?php echo $_GET['test1']?>" />

87,910

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧