Web Programing
트위터, 페이스북에 링크 공유하기
Mash
2011. 9. 2. 14:00
반응형
function sendTwitter(sTitle,sUrl){
var shref = "http://twitter.com/home?status="+encodeURIComponent(sTitle)+" "+encodeURIComponent(sUrl);
var sWindow = window.open(shref);
if(sWindow){
sWindow.focus();
}
}
function sendFacebook(sTitle,sUrl){
var shref = "http://wwww.facebook.com/share.php?u="+encodeURIComponent(sUrl)+"&t="+encodeURIComponent(sTitle);
var sWindow = window.open(shref);
if(sWindow){
sWindow.focus();
}
}
반응형