i need a code example for putting a button and input box on a webpage using javascript. when clicked the button should send the webbrowser to www.website.com/contentsofinputbox
Printable View
i need a code example for putting a button and input box on a webpage using javascript. when clicked the button should send the webbrowser to www.website.com/contentsofinputbox
Code:<script>
function go()
{
var url = "http://www.website.com/" + document.a.b.value;
window.location = url;
}
</script>
<form name="a">
<input type="text" name="b">
<input type="button" value="Go!" onClick="go();">
</form>
thx it works great :)