2013-02-04 67 views
0

我目前使用sharer php方法來實現IE8中的分享按鈕。問題是,即使代碼是相同的,但在IE8等瀏覽器生成的鏈接是不同的Facebook分享按鈕在IE8上不工作

代碼爲

// Change the information in FaceBook share 
    function fbs_click() { 
     u=location.href; 
     t=document.title; 
     window.open("http://www.facebook.com/sharer.php?s=100&p[url]=" + u + "&p[images][0]=http://www.hkheadline.com/image/logo_140.gif&p[title]=" + t + "&p[summary]= share message",'sharer','toolbar=0,status=0,width=626,height=436'); 

     return false; 
    } 



IE 8 : 
http://www.facebook.com/issue/20121220/page/69&p[images][0]=http://www.hkheadline.com/image/logo_140.gif&p[title]=FlipBook%20demo&p[summary]=share message 

Chrome/Fx : 
http://www.facebook.com/sharer/sharer.php?s=100&p%5Burl%5D=http%3A%2F%2F203.80.1.28%2FFlippingBook%2FDev%2FFrontend%2FflipV5.html%3Fissue%3D20121220&p%5Bimages%5D%5B0%5D=http%3A%2F%2Fwww.hkheadline.com%2Fimage%2Flogo_140.gif&p%5Btitle%5D=FlipBook+Demo&p%5Bsummary%5D=%E9%A0%AD%E6%A2%9D%E6%97%A5%E5%A0%B1%E5%88%86%E4%BA%AB&page=1 

爲什麼不同瀏覽器的行爲也不同,如何解決呢?謝謝

回答

1

使用%20代表#,就是這樣。