【发布时间】:2012-01-11 13:39:35
【问题描述】:
我的 Tweet 按钮具有以下 href 值:“https://twitter.com/intent/tweet?text=Yields in Tanzania”。我如何包括 20%?我的输出应该是:“https://twitter.com/intent/tweet?text=Yields in Tanzania is 20%” - 这给了我 324 错误代码。
【问题讨论】:
我的 Tweet 按钮具有以下 href 值:“https://twitter.com/intent/tweet?text=Yields in Tanzania”。我如何包括 20%?我的输出应该是:“https://twitter.com/intent/tweet?text=Yields in Tanzania is 20%” - 这给了我 324 错误代码。
【问题讨论】:
% 在 url 中用于对不安全字符进行编码。为了物理传递%,您必须对其进行编码。在 ISO-8859-1(使用的编码)中,百分号的十六进制值为 25。
所以,你实际上应该使用:
"https://twitter.com/intent/tweet?text=Yields in Tanzania is 20%25"
【讨论】: