0
我想使用HTML電子郵件中的Google+分享按鈕。我把超鏈接通過Google+分享按鈕獲取數據
https://plus.google.com/share?url={URL}
到電子郵件。
但是當我嘗試超鏈接時,GET數據有問題。如果我將?parameter=name
添加到網址中,那麼Google+不會接受。
如何發送正確的URL?
我想使用HTML電子郵件中的Google+分享按鈕。我把超鏈接通過Google+分享按鈕獲取數據
https://plus.google.com/share?url={URL}
到電子郵件。
但是當我嘗試超鏈接時,GET數據有問題。如果我將?parameter=name
添加到網址中,那麼Google+不會接受。
如何發送正確的URL?
根據documentation,url
值必須進行網址編碼。
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')
請澄清的問題(包括錯誤文本,充分反應,等等)。 – eebbesen