您的位置:首页 > Web前端 > HTML

html页面互相传值的问题解决方案

2014-05-19 16:13 155 查看
第一次使用随笔,感觉还是蛮别扭的
a.html

<html> 
<head> 
<title> demo </title> 
<meta name="Author" content="xugang" /> 
</head> 
<body> 
<FORM name="frm" METHOD="get" ACTION="b.html" onsubmit="return foo()"> 
<INPUT TYPE="hidden" id="hid" value="123" name="hid"> 
<INPUT TYPE="submit" value="提交"> 
</FORM> 
</body> 
</html>

b.html

<HTML> 
<HEAD> 
<TITLE> New Document </TITLE> 
</HEAD> 
<BODY> 
<SCRIPT LANGUAGE="JavaScript"> 
document.write(location+"
"); 
document.write(location.search+"
"); 
document.write(decodeURIComponent(location.search.substr(location.search.indexOf("=")+1))); 
</SCRIPT> 
</BODY> 
</HTML>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: