Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/398.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/72.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 为什么可以';我不能使用非库存的Pin按钮吗?_Javascript_Html_Pinterest - Fatal编程技术网

Javascript 为什么可以';我不能使用非库存的Pin按钮吗?

Javascript 为什么可以';我不能使用非库存的Pin按钮吗?,javascript,html,pinterest,Javascript,Html,Pinterest,这可能是我最不注重代码的问题,但我根本无法让它起作用。我尝试使用square.png作为pinit按钮,而不是pinterest提供的stock按钮 下面是实现该按钮的代码: var twit = 'http://twitter.com/home?status='+title+'%20'+url; var facebook = 'http://www.facebook.com/sharer.php?u='+url var linkedIn = 'https://www.linkedin.com/

这可能是我最不注重代码的问题,但我根本无法让它起作用。我尝试使用square.png作为pinit按钮,而不是pinterest提供的stock按钮

下面是实现该按钮的代码:

var twit = 'http://twitter.com/home?status='+title+'%20'+url;
var facebook = 'http://www.facebook.com/sharer.php?u='+url
var linkedIn = 'https://www.linkedin.com/cws/share?url='+url+'&title='+title;
var gPlus = 'https://plus.google.com/share?url='+url+'&title='+title;
var pinterest = 'http://pinterest.com/pin/?url=' + url + '&title=' + title;

var tbar = '<div id="socializethis"><span>Share<br /><a href="#min" id="minimize" title="Minimize"> <img src="/images/minimize.png" /> </a></span><div id="sicons">';
tbar += '<a href="'+twit+'" id="twit" title="Share on twitter"><img src="/Content/images/twitter.png"  alt="Share on Twitter" width="32" height="32" /></a>';
tbar += '<a href="'+facebook+'" id="facebook" title="Share on Facebook"><img src="/Content/images/facebook.png"  alt="Share on facebook" width="32" height="32" /></a>';
tbar += '<a href="'+linkedIn+'" id="linkedIn" title="Share on Linked In"><img src="/Content/images/linkedIn.png"  alt="Share on Linked In" width="32" height="32" /></a>';
tbar += '<a href="'+gPlus+'" id="gPlus" title="Share on Google plus"><img src="/Content/images/gPlus.png"  alt="Share on Google Plis" width="32" height="32" /></a>';
tbar += '<a href="'+pinterest+'" id="pinterest" title="Share on pinterest"><img src="/Content/images/pint.png"  alt="Share on pinterst" width="32" height="32" /></a>';
tbar += '</div></div>';
var twit='1〕http://twitter.com/home?status='+标题+'%20'+url;
风险值http://www.facebook.com/sharer.php?u=“+url
var linkedIn='1〕https://www.linkedin.com/cws/share?url=“+url+”&;标题='+标题;
var gPlus=https://plus.google.com/share?url=“+url+”&;标题='+标题;
pinterest变量http://pinterest.com/pin/?url=“+url+”&;标题='+标题;
var tbar='份额
'; tbar+=''; tbar+=''; tbar+=''; tbar+=''; tbar+=''; tbar+='';
我正在为方形图标创建一个下拉列表,因此它是javascript附加到文档中的一组html字符串


其他网站的按钮工作得很好,pinterest网站总是把按钮变成自己的按钮。我尝试过使用url,或者我网站上的任何脚本,但是不管怎样,为了链接到正确的url,它会变成stock按钮。非常感谢您的帮助。

您能看一下有关stackoverflow的问题吗。这里有三个链接可以帮助您解决问题,还有一个链接指向关于定制pinterest PIN的另一个问题。看看吧,希望有帮助

我希望这是一个第三方的脚本,这样做。图像不仅仅是神奇地改变自己,所以无论你的“socalizethis”是什么,它都必须查看你的链接并修改Pinterest中的图像。这可能是一个使用Pinterest的术语,要求你使用他们的图像-你可能想看看。不。社交这是菜单的名称。它是一组html字符串、静态IMG,并将所有内容附加到dom中。只有在品特瑞斯的尽头,事情才会改变。其他网站都没有给我这个问题,我的网站上没有任何pinterest脚本,它只会在我有url时更改图像:……可能是url/create/button实际创建并覆盖了pin按钮的img src,并将其替换为它们生成的src,您检查了img链接上的src吗?它变了吗?如果是这样,您可以在页面完成加载或查看文档后再次覆盖它,必须有人知道它为什么会这样做。也许你可以使用另一个用于自定义PIN的URL。我已经尝试过这个解决方案,但是写入的方式不允许它在javascript中工作。