일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
31 |
- 날짜변환
- SSL
- 날짜비교
- 디지털 정부서비스ui/ux
- 글자 수 제한
- virsualhost
- Vanilla JS
- 자바스크립트
- 301 리다이렉트
- 정규식
- selinux
- MySQL
- 비동기호출
- Ajax
- 애니메이트
- 리사이즈
- JS
- 구글뷰어
- .htaccess
- iframe
- 우분투
- 정부 서비스 가이드라인
- 우분투 npm 설치
- post_type
- 페이지전환효과
- 배열
- ip직접접근차단
- 보안인증서
- 글자수제한
- JavaScript
- Today
- Total
더 나은 프로그래머가 되자
트위터,페이스북,구글플러스 연동 스크립트 함수 sns 본문
<script type="text/javascript">
function goFaceBook(title,url)
{
var href = "http://www.facebook.com/sharer.php?u=" + encodeURIComponent(url) + "&t=" + encodeURIComponent(title);
var a = window.open(href, 'facebook', 'width=600,height=300');
if (a) {
a.focus();
}
}
function goTwitter(title,url)
{
var href = "http://twitter.com/share?text=" + encodeURIComponent(title) +" "+ encodeURIComponent(url);
var a = window.open(href, 'twitter', 'width=600,height=300');
if (a) {
a.focus();
}
}
function goGoogleplus(title,url)
{
var href = "https://plus.google.com/share?url=" + encodeURIComponent(url);
var a = window.open(href, 'google', 'width=600,height=400,scrollbars=yes');
if (a) {
a.focus();
}
}
</script>
<a onclick="goTwitter();">트위터</a>
'언어 > js' 카테고리의 다른 글
자바스크립트 문자열 자르기 (0) | 2011.11.07 |
---|---|
자바스크립트 영문,대문자,소문자,숫자 체크 (0) | 2011.11.07 |
자식창에서 부모창 경로 이동 (0) | 2011.10.04 |
자바스크립트 숫자에 콤마 찍기(정규식) (0) | 2011.08.10 |
이미지 리사이즈 스크립트 (0) | 2011.01.10 |