var url = $(location).attr('search'); var title = $("title").text(); console.log("["+ title + "](" + url + '"' + title + '")');