This is probably extremely simple but I am a total newbie. I use something like this to add an input to the end of an URL
javascript:
(function() {
var val= prompt("Enter #","");
if (val)
location="http://www.test.com?param="+escape(val);
})()
But now I want to add something to the middle of another url like:
http://www.test.com/ENTERSOMETHINGHERE/html/stuff/
I have no clue what I am doing.
Just concatenate the strings together:
javascript:
(function() {
var val= prompt("Enter #","");
if (val)
location="http://www.test.com/"+escape(val)+"/html/stuff";
})()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With