Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
通常,在 twitter 推文按钮上,如果我不指定数据文本,它将采用页面标题页。但是使用 iframe?如何获取页面标题?
我知道我可以添加&text=查询字符串,但是如果我不想指定不同的页面标题,但我在哪里?是否可以?
&text=
如果您使用的是 JavaScript,则可以指定document.title属性,例如:
xMyIframe.src = 'mypage.htm?text=' + document.title