<a href="http://www.abc.com/search.asp?keyword=document.getElementById('b').value">提交 </a>

解决方案 »

  1.   

    这个其实简单了:
    <html xmlns="http://www.w3.org/1999/xhtml" >
    <head runat="server">
        <title>无标题页</title>
        <script language="javascript" type="text/javascript">
        function f_href()
        {
            window.open("http://www.abc.com/search.asp?keyword="+document.all("b").value);
        }
        </script>
    </head>
    <body>
        <form id="form1" runat="server">
        <div>
        <input name="b" type="text" id="b" /> 
        <a href="#" onclick="javascript:f_href();">提交 </a>
        </div>
        </form>
    </body>
    </html>
      

  2.   

    <input name="b" type="text" id="b" /> 
    <a href="" onmousedown="javascript:if(document.getElementById('b').value!="")this.href='http://www.abc.com/search.asp?keyword='+document.getElementById('b').value; else {this.href=window.location.href+'#';alert('为空不能提交');}">提交 </a>