document.location==document.URL 指定文档路径是反对使用的。建议用window.location.href

解决方案 »

  1.   

    function doFilter(menuName, menuValue)
    {
    var url = "search.html?${queryStr}&" + menuName + "=" + menuValue;
    document.location = url;
    }
    不好意思,继续问问,这个函数是不是返回url,还是什么意思,
    <div class="filterMenuItem">
    <a class="filterMenuLink" href="javascript:doFilter('$menuName', '$option')">$velocityUtil.ucAllFirst($option)</a>
    /div>
      

  2.   

    (1)
    function doFilter(menuName, menuValue)
    {
    var url = "search.html?${queryStr}&" + menuName + "=" + menuValue;
    document.location = url;
    }
    <div class="filterMenuItem">
    <a class="filterMenuLink" href="javascript:doFilter('$menuName', '$option')">$velocityUtil.ucAllFirst($option)</a>
    /div>

    (2)
    <div class="dropdown_menu_entry">
    <a class="drop_menu_link" href="search.html?cid=$cat.getCategoryId()">$cat.getDescription()</a>
    </div>
    得区别是什么?
    实际上我要解决得bug就是他们之间得区别,
    bug如下:
     Steps: 
    1.Go to destination lighting and then Lamps & Shades > Table and Desk. 
    2.User should be able to click anywhere in the drop down menu while selecting an option (Finish,Use) to sort the products and not just the text.  
    意思是:在product listing page上,必须要将鼠标移到下拉字体当中,才能点击,(1)得实现,
    而在主页面,就是鼠标移到菜单上,不在下拉菜单得字体上也能点击(2)得实现,
      

  3.   

    问题应该容易,但是我不太熟悉javaScripe 和html这一块,这个问题也不好去问上司,对我来说现在比较棘手。