html页面互相传值的问题

时间:2014-05-19 21:38:01   收藏:0   阅读:413

第一次使用随笔,感觉还是蛮别扭的

a.html

bubuko.com,布布扣
<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>
bubuko.com,布布扣

 

b.html

bubuko.com,布布扣
<HTML> 

  <HEAD> 

    <TITLE> New Document </TITLE> 

  </HEAD> 

  <BODY> 

    <SCRIPT LANGUAGE="JavaScript"> 
         document.write(location+"<br>"); 
         document.write(location.search+"<br>"); 
        document.write(decodeURIComponent(location.search.substr(location.search.indexOf("=")+1))); 

    </SCRIPT> 

  </BODY> 

</HTML>
bubuko.com,布布扣

 

html页面互相传值的问题,布布扣,bubuko.com

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!