node.js - Appending url query -
this first time create application using nodejs , need little help. want append query in url clicking button.
the website has search box, , navigation sorting(most viewed,most downloaded)
ex:
when searching foo
, url this.
localhost:3000/search?q=foo
but when clicked most viewed button, result be
localhost:3000/search?tab=views
expected result
localhost:3000/search?q=foo&tab=views
i found solution, checked how stackoverflow.com handles search. example, searched "hello world" here in stackoverflow.
the url https://stackoverflow.com/search?q=hello+world
and button/links following be:
relevance = https://stackoverflow.com/search?tab=relevance&q=hello+world
newest= https://stackoverflow.com/search?tab=newest&q=hello+world
sorry if question unclear solution looking for.
Comments
Post a Comment