Looking for a way to redirect a blogger post to an external url

冷暖自知 提交于 2020-02-07 05:11:07

问题


I'm looking for someone to help me interpret a question and answer posted that I followed on this site. Here's a link to the original question:

How can I redirect just a single blogger.com page to an external URL?

I'm having trouble understanding the application of the answer. I can get into the html code section of the post editor, but I'm confused from here.

Heres the code I'm trying to insert into Blogger

<script type="text/javascript">
window.location = "http://myblog.blogger.com/mypost";
</script>

Where should I put my external site redirect? Is that all I have to modify in this code?

I'm trying to have a blog post title link to an external source

I'm grateful in advance, Michael


回答1:


window.location = "http://myblog.blogger.com/mypost";

instead of http://myblog.blogger.com/mypost put your URL and it automatically redirects you to the other URL so i guess u should keep an Onclick even before running the java script




回答2:


Step 1 Got to Blogger Post in Edit Mode

Step 2 Add Javascript redirect code in post

<script>

window.location = "http://www.example.com/your-new-url-to-redirect-when-this-post-loads";

</script>

Complete Tutorial



来源:https://stackoverflow.com/questions/26247097/looking-for-a-way-to-redirect-a-blogger-post-to-an-external-url

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!