2011. 5. 2. 18:17ㆍ개발언어/JavaScript
//트위터
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 sendM2Day(sTitle,sUrl){
var shref ="http://me2day.net/posts/new?new_post[body]"+encodeURIComponent(sTitle)+" "+encodeURIComponent(sUrl);
//++"&new_post[tags]"+encodeURIComponent(sTag);
var sWindow=window.open(shref);
if (sWindow){
sWindow.focus();
}
}
//페이스북
function sendFacebook(sTitle,sUrl){
var shref ="http://www.facebook.com/share.php?u="+encodeURIComponent(sUrl)+"&t="+encodeURIComponent(sTitle);
var sWindow=window.open(shref);
if (sWindow){
sWindow.focus();
}
}
//싸이월드 공감
function sendNateC(sTitle,sUrl,summary){
var shref ="http://csp.cyworld.com/bi/bi_recommend_pop_euc.php?url="+encodeURIComponent(sUrl)+"&corpid=seoulshinmun&summary="+encodeURIComponent(summary)+"&title="+encodeURIComponent(sTitle);
var sWindow=window.open(shref,'','menubar=no, toolbar=no, location=no, scrollbars=no');
if (sWindow){
sWindow.focus();
}
}
//요즘
function sendDaum(sTitle,sUrl){
var shref ="http://yozm.daum.net/api/popup/prePost?link="+encodeURIComponent(sUrl)+"&prefix="+encodeURIComponent(sTitle);
var sWindow=window.open(shref, 'yozmSend', 'width=466, height=356');
if (sWindow){
sWindow.focus();
}
}
'개발언어 > JavaScript' 카테고리의 다른 글
[JavaScript] 자바스크립트 MVC 프레임워크 종류 (0) | 2014.01.12 |
---|---|
[JavaScript] 상속 (0) | 2010.06.01 |
[JavaScript] get 방식 한글로 처리 Encode , Decode (0) | 2010.04.28 |
[JavaScript] 이벤트 (0) | 2010.04.28 |
[JavaScript] JavaScript 와 JScript 의 차이점 (0) | 2010.04.28 |