javascript 页面传值

 

  <script type="text/javascript">
                  
function EnterSearch(event) {
                      
if (event.keyCode == 13) {
                          SearchGoogle();
                      }
                  }

                 
                  
           
                  
function SearchGoogle() {
                      
var keystr = encodeURIComponent(document.getElementById('searchKeyword').value);
                      window.location 
= "/search.aspx?keyword=" + keystr;
                  }
              
</script>




  
var urlString = document.location.search;
    
if (urlString != null) {
        
var keyword = QueryString("keyword");
       
// alert(keyword);
        if (keyword != null && keyword != '') {
            document.getElementById(
'sbi').value = decodeURIComponent(keyword);
            document.getElementById(
'form1').submit();
        }
    }
posted @ 2009-03-09 14:56  paymob  阅读(229)  评论(0编辑  收藏  举报