2014-03-05 10 views
0

我想使用HTML電子郵件中的Google+分享按鈕。我把超鏈接通過Google+分享按鈕獲取數據

https://plus.google.com/share?url={URL} 

到電子郵件。

但是當我嘗試超鏈接時,GET數據有問題。如果我將?parameter=name添加到網址中,那麼Google+不會接受。

如何發送正確的URL?

+0

請澄清的問題(包括錯誤文本,充分反應,等等)。 – eebbesen

回答

0

根據documentationurl值必須進行網址編碼。

E.g. http://example.com/?foo=bar應該http%3A%2F%2Fexample.com%2F%3Ffoo%3Dbar

https://plus.google.com/share?url=http%3A%2F%2Fexample.com%2F%3Ffoo%3Dbar 

在JavaScript中,你可以使用encodeURIComponent('http://example.com/?foo=bar')