function getValueInBox()
{
    var page = document.getElementById("htmlPage").value;
    return page;
}我是写的这个函数
但不知道怎么放到链接里,便链接得到这个值

解决方案 »

  1.   

    <INPUT id="htmlPage" style="FONT-SIZE: 9pt; WIDTH: 25px; HEIGHT: 18px" type="text" size="1"><a href="javascript:location.href='messagelist.aspx?msgtype=&1page='+getValueInBox()">GO</a>
      

  2.   

    <a href='' id ="a1">GO</a>
    <script>
    document.getElementById("a1").href = "messagelist.aspx?msgtype=1&page="+getValueInBox;
    </script>