Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/405.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
打印facebook提要代码javascript_Javascript_Facebook - Fatal编程技术网

打印facebook提要代码javascript

打印facebook提要代码javascript,javascript,facebook,Javascript,Facebook,我有一个相当讨厌的facebook字符串要用javascript打印。 如何使用这些变量在html中动态打印它。 我尝试了转义函数,但它给了我一个错误 $(document).ready(function() { // var cw = $('#container').height(); var ch = innerHeight; var cw = innerWidth; if (ch<601){ // 800 height var boxHeight = 70;

我有一个相当讨厌的facebook字符串要用javascript打印。 如何使用这些变量在html中动态打印它。 我尝试了转义函数,但它给了我一个错误

$(document).ready(function() {
// var cw = $('#container').height();
var ch = innerHeight;
var cw = innerWidth;

if (ch<601){  // 800 height
        var boxHeight = 70;
        var connections = 0;
    var contentHeight = 70;
     }

// some more code

var code = escape(<iframe width=\"100%\" height=+boxHeight+scrolling=\"no\" frameborder=\"0\" id=\"532808336752730\"           name=\"532808336752730\" class=\"ign\" src=\"//mj89sp3sau2k7lj1eg3k40hkeppguj6j-a-sites-opensocial.googleusercontent.com/gadgets/ifr?
url=http://www.gstatic.com/sites-gadgets/iframe/iframe.xml&amp; container=enterprise&amp;
view=default&amp; lang=en&amp; country=GB&amp; sanitize=0&amp; v=c7249922a405f702&amp;
libs=core&amp; parent=https://sites.google.com/site/fbinttest/open-graph-widgets---like-box#up_scroll=no&amp;up_iframeURL=http://www.facebook.com/plugins/likebox.php?
id%3D532808336752730 
%26 width%3D220
%26 connections%3D+connections+ 
%26 stream%3Dfalse
%26 header%3Dfalse
%26 height%3D+contentHeight+&amp;
st=e%3DAIHE3cC8keZ4jWCwAVS5J7Ace2UnSrmYsNC4bvRK2Oq2MwcECDrHk90njmz6u0td%252FXLpfJH6Mhb50okeZyp3yufxzWcghX8yUJQHe8TpzAERAjXXy2gv8HvVkOagM%252F8aKaFDi66dO6Kh%26c%3Denterprise&amp;rpctoken=-532808336752730\"></iframe>);

print c0de;
$(文档).ready(函数(){
//var cw=$(“#容器”).height();
var ch=内部高度;
var cw=内部宽度;
如果(ch