javascript - Edit and search an URL with JS -


i'm trying make easy google chrome extension gets string textbox , adds url (ie "https://www.google.com/search?q=") , google url+ input string. how should make it?

i must i'm beginner, thinking of function reads input textbox , adds url. this: var google = "google.com/search?q=" + textbox

something maybe ?

getting content of textbox (assuming target input has textbox id ofc):

var query = document.getelementbyid('textbox').value

redirection:

window.location.href = 'https://www.google.com/search?q=' + query

i'm not quite sure of you'd though.


Comments

Popular posts from this blog

c# - Operator '==' incompatible with operand types 'Guid' and 'Guid' using DynamicExpression.ParseLambda<T, bool> -