如果希望在重定向中提交到新的地址,可以使用下面的方法:
var q = $("#gtin-search").val(); $(location).attr('href', window.location.href + "?q=" + q);