2

我在我的 wordpress 网站上创建了一个帖子,并分享了几个 javascript 小书签。一旦您在对话框中输入单词,其中 2 个会执行 Google 自定义搜索。

这是其中之一的代码:

<a href='javascript:q = "" +(window.getSelection ?  window.getSelection() : document.getSelection ? document.getSelection() : document.selection.createRange().text); if (!q) q = prompt("Find Royalty Free From Wikimedia, Simply enter a keyword into the box below", ""); if (q!=null) window.open("http://www.google.com/images?q= " +"\"I+grant+anyone+the+right+to+use+this+work+for+any+purpose%2C+without+any+conditions%2C+unless+such+conditions+are+required+by+law\" + " + escape(q).replace(/ /g, ""+"")) ; void 0' ;
            <font color="#000000">Wikimedia Images</font></a>

现在由于某种原因在我的测试站点上它工作得很好,但是在我的个人博客上发布时它不起作用。测试博客和个人博客在不同的主机上,运行不同的主题等。

知道什么会导致这个问题吗?

如果您想查看当前显示在其上的帖子http://thewiseaffiliate.com/free-stuff/free-images-for-commercial-website/ 滚动到帖子底部,您将看到一个超链接的 stackoverflow。

如果我在我的测试站点上重复相同的过程,超链接将加载书签对话框。

这是测试站点,Wikimedai 超链接上使用的 smae 代码:http: //hair.siterubix.com/hello-world

对此的任何帮助表示赞赏。

4

0 回答 0