185、商城业务-检索服务-页面筛选条件渲染

tech2024-08-15  41

th:href="${'javascript:searchProducts("brandId", '+brand.brandId+')'}"

 

function searchProducts(name, value){ //原来的页面 location.href = location.href + "&" + name + "=" + value; }

地址栏地址就会改变

th:href="${'javascript:searchProducts("catalog3Id", '+catalog.catalogId+')'}"

function searchProducts(name, value){ //原来的页面 var href = location.href + ""; if(href.indexOf("?") != -1){ location.href = location.href + "&" + name + "=" + value; } else { location.href = location.href + "?" + name + "=" + value; } }

 

最新回复(0)