3C科技 娛樂遊戲 美食旅遊 時尚美妝 親子育兒 生活休閒 金融理財 健康運動 寰宇綜合

Zi 字媒體

2017-07-25T20:27:27+00:00
加入好友
最前陣子我加上了「社群分享按鈕」,若你們覺得論壇上面的文章或是教學很讚,可以按這裡分享給你的朋友知道 目前我還沒找到google+的語法可以嵌入,所以暫時就只有這三種 若知道google+怎麼可以做到時,就會加上第四種 透過皮樂的分享 已經加上去Google+的功能 方便大家分享囉 要做到這個功能語法如下 PHP 代碼: 推上facebook <a href="javascript: void(window.open('http://www.facebook.com/share.php?u='.concat(encodeURIComponent(location.href)) ));" title="推上Facebook"> 推上臉書 a>  PHP 代碼: 推上twitter <a href="javascript: void(window.open('http://twitter.com/home/?status='.concat(encodeURIComponent(document.title)) .concat(' ') .concat(encodeURIComponent(location.href))));" title="推上twitter"> 推上twitter a>  PHP 代碼: 推上噗浪 <a href="javascript: void(window.open('http://www.plurk.com/?qualifier=shares&status=' .concat(encodeURIComponent(location.href)) .concat(' ') .concat('(') .concat(encodeURIComponent(document.title)) .concat(')')));" title="推上噗浪"> 推上噗浪 a>  PHP 代碼: 推上google+ <a href="javascript: void(window.open('https://plusone.google.com/_/+1/confirm?hl=zh-TW&url='.concat(encodeURIComponent(location.href)) ));" title="推上Google+"> 推上Google+ a>  其中 Google+可以用另外一個專屬網頁來產生你要的語法 http://www.google.com/webmasters/+1/button/ PHP 代碼: <g:plusone annotation="inline">g:plusone> <script type="text/javascript">   window.___gcfg = {lang: 'zh-TW'};   (function() {     var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;     po.src = 'https://apis.google.com/js/plusone.js';     var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);   })();   而facebook也有專屬網頁來生成 https://developers.facebook.com/docs/guides/web/ 或是用這個方式 PHP 代碼: <iframe src="https://www.facebook.com/plugins/like.php?href=YOUR_URL"         scrolling="no" frameborder="0"         style="border:none; width:450px; height:80px">iframe> 

本文由iphone4TW提供 原文連結

寫了 5860316篇文章,獲得 23313次喜歡
精彩推薦