Javascript iframe中是否有用于mobile safari的twitter帖子方法?
我在div中嵌入了以下iframeJavascript iframe中是否有用于mobile safari的twitter帖子方法?,javascript,iframe,twitter,src,Javascript,Iframe,Twitter,Src,我在div中嵌入了以下iframe <div id="sharepopup" class="sharepopup"> <iframe id="social" class="social" frameborder="0"> </iframe> <div id="shareclosebutton" class="shareclose"></div> </div> 我正试图做到这一点 document.g
<div id="sharepopup" class="sharepopup">
<iframe id="social" class="social" frameborder="0">
</iframe>
<div id="shareclosebutton" class="shareclose"></div>
</div>
我正试图做到这一点
document.getElementById('social').src="https://twitter.com/intent/tweet?original_referer=&text=Check%20out%20this%20page&tw_p=tweetbutton&url=http%3A%2F%2Fwww.MYSITE.co.uk%2Fhhg%2FMYPAGE.html?="+pagenumber;
当我使container div可见时
但我得到的只是一个空白的iframe
有没有其他人能够让web内容在iframe中工作?
请不要回答JQUERY。您可以使用ajax post或向用户发送get请求server@raam86你有这样的例子吗?非常感谢。
$.post(您的URL到获取路径,函数(数据){console.log(数据)//do stuff})
一个JSFIDLE或演示页面?很抱歉,这一行代码与我在dev.twitter.com上读到的任何代码一样晦涩难懂。只需将您的URL\u TO\u GET\u PATH
替换为您试图发布到的实际路径即可。您可以从浏览器控制台或curl或其他任何地方执行它
document.getElementById('social').src="https://twitter.com/intent/tweet?original_referer=&text=Check%20out%20this%20page&tw_p=tweetbutton&url=http%3A%2F%2Fwww.MYSITE.co.uk%2Fhhg%2FMYPAGE.html?="+pagenumber;