Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/469.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript iframe中是否有用于mobile safari的twitter帖子方法?_Javascript_Iframe_Twitter_Src - Fatal编程技术网

Javascript iframe中是否有用于mobile safari的twitter帖子方法?

Javascript 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中嵌入了以下iframe

<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;