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的参数怎么都传不过来,请问是怎么回事??
<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的参数怎么都传不过来,请问是怎么回事??
解决方案 »
- ext框架改出来的页面在ie,火狐下正常显示,在safari下完全显示不出来,怎么解决呀
- 怎样设置ext中grid的左右滚动条,上下滚动条不出现
- 腾讯新闻的评论提交不上去,不知道什么问题
- javascript字符串连接,请人给我彻底讲讲
- 想问下下面的JS为何在firefox里一点效果都没!在IE里是一个2级横向菜单
- regEx.Pattern = "(\bselect\b |\sand\s |' | |\sdeclare\s)"
- 这样的小问题也没人能解决吗?
- cells(3)和rowIndex+3的含义
- 请问js能有什么函数能访问数据库吗?谢谢
- 如何取得一个已打开窗口的句柄??
- window.open("main.aspx","_self","toolbar=no");去不掉工具栏
- 请教~HTML页面向PHP页面传递两个变量
<input type="text" disabled="disabled" value="<?php echo $_GET['test1']?>" />