I tried this but it doesn't seem to be working:
$('</head>').appendTo("<meta http-equiv='refresh' content='0;url=http://google.com'>");
First, the item you're trying to append isn't valid HTML, it's simply the closing head tag and presumably already exists in the document. Second, you shouldn't be using appendTo
in this case, but rather append
:
$('head').append("<meta http-equiv='refresh' content='0;url=http://google.com'>");
Third, there's no reason to do either because you could just as easily change the location using javascript as well.
window.location = "http://google.com";
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