是否可以像这样调用location.href中的onload函数...(jQuery)
location.href =getContextPath()+"/home/returnSeachResult?search="$('#id-search-text-box').val()"&category="$('#search_concept').text()" onload='javascript: searchProductList('+category+','+searchdata+')'";
请帮助我......提前谢谢
答案 0 :(得分:0)
试试这个方法:
$(function() {
searchProductList('+category+','+searchdata+');
location.href =getContextPath()+"/home/returnSeachResult?search=" + $('#id-search-text-box').val() + "&category=" + $('#search_concept').text();
})