a.htm<HTML>
<HEAD>
<META http-equiv="Content-Type" content="text/html; charset=gb2312">
<SCRIPT language="javascript">
function directions(str)
{
    window.open('b.htm?' + str);
}
</SCRIPT>
</HEAD><BODY>
<INPUT type="button" onClick="directions('hello')" value="button">
</BODY>
</HTML>
b.htm<HTML>
<HEAD>
<META http-equiv="Content-Type" content="text/html; charset=gb2312">
<TITLE>无标题文档</TITLE>
</HEAD><BODY onLoad="txt.value = location.search">
<INPUT type="text" id="txt">
</BODY>
</HTML>