마우스오버시 이미지가 조금 커지면서 돌아가는 효과

<style>

.widget_thumbnail{

display: inline-block;

margin: 0px 15px 0px 0px;

overflow: hidden;

}


.widget_thumbnail img{

-webkit-transition:0.4s;

-moz-transition:0.4s;

-o-transition:0.4s;

transition:0.4s;

}


.widget_thumbnail img:hover{

-webkit-transform:scale(1.3) rotate(10deg);

-moz-transform:scale(1.3) rotate(10deg);

-o-transform:scale(1.3 rotate(10deg));

transform:scale(1.3) rotate(10deg);

}

</style>


적용방법 : 

<span class="widget_thumbnail"><img src="이미지경로"></span>

'CSS' 카테고리의 다른 글

div 태그 내 말줄임표 적용  (0) 2015.08.03
모바일에 적용되는 미디어쿼리  (0) 2015.07.19
이미지 없이 div 라운드 처리  (0) 2012.06.01

Datepicker 설정

JAVASCRIPT 2015. 7. 23. 04:38 Posted by Dayis

 $(".datepicker").datepicker({

  showOn: "both", // 버튼과 텍스트 필드 모두 캘린더를 보여준다.

  buttonImage: "/application/db/jquery/images/calendar.gif", // 버튼 이미지

  buttonImageOnly: true, // 버튼에 있는 이미지만 표시한다.

  changeMonth: true, // 월을 바꿀수 있는 셀렉트 박스를 표시한다.

  changeYear: true, // 년을 바꿀 수 있는 셀렉트 박스를 표시한다.

  minDate: '-100y', // 현재날짜로부터 100년이전까지 년을 표시한다.

  nextText: '다음 달', // next 아이콘의 툴팁.

  prevText: '이전 달', // prev 아이콘의 툴팁.

  numberOfMonths: [1,1], // 한번에 얼마나 많은 월을 표시할것인가. [2,3] 일 경우, 2(행) x 3(열) = 6개의 월을 표시한다.

  //stepMonths: 3, // next, prev 버튼을 클릭했을때 얼마나 많은 월을 이동하여 표시하는가. 

  yearRange: 'c-100:c+10', // 년도 선택 셀렉트박스를 현재 년도에서 이전, 이후로 얼마의 범위를 표시할것인가.

  showButtonPanel: true, // 캘린더 하단에 버튼 패널을 표시한다. 

  currentText: '오늘 날짜' , // 오늘 날짜로 이동하는 버튼 패널

  closeText: '닫기',  // 닫기 버튼 패널

  dateFormat: "yy-mm-dd", // 텍스트 필드에 입력되는 날짜 형식.

  showAnim: "slide", //애니메이션을 적용한다.

  showMonthAfterYear: true , // 월, 년순의 셀렉트 박스를 년,월 순으로 바꿔준다. 

  dayNamesMin: ['월', '화', '수', '목', '금', '토', '일'], // 요일의 한글 형식.

  monthNamesShort: ['1월','2월','3월','4월','5월','6월','7월','8월','9월','10월','11월','12월'] // 월의 한글 형식.

                    

 });

'JAVASCRIPT' 카테고리의 다른 글

iframe 자동 높이 조절  (0) 2015.10.19
마우스 클릭 위치 좌표값  (0) 2015.08.21
즐겨찾기 추가 스크립트  (0) 2015.07.18
입력폼에서 엔터키를 눌렀을 때..  (0) 2015.07.12
숫자만 입력  (0) 2015.03.16

ASP 쿠키 로그인/로그아웃

ASP 2015. 7. 21. 04:30 Posted by Dayis

'로그인 시 

Response.Cookies("member").Domain = "도메인"

Response.Cookies("member").Path = "/"

Response.Cookies("member")("id") = trim(id)

Response.Cookies("member")("name") = trim(name)

Response.Cookies("member").Expires = date + 1

 

'로그아웃 시

Response.Cookies("member").Domain = "도메인"

Response.Cookies("member").Path = "/"

Response.Cookies("member")("id") = ""

Response.Cookies("member").Expires = date - 1

'ASP' 카테고리의 다른 글

쿠키(Cookies) 중복 체크 및 처리  (0) 2015.11.07
ASP 달력 Calendar  (0) 2015.09.23
년월의 마지막 날짜(일) 구하기  (0) 2015.07.18
ASP 이미지 가로, 세로 크기 구하기  (0) 2015.01.19
페이지 초기번호  (0) 2015.01.04

모바일에 적용되는 미디어쿼리

CSS 2015. 7. 19. 02:52 Posted by Dayis

<style type="text/css">

@media only screen and (min-device-width : 320px) and (max-device-width : 480px) {

/* 적용CSS */

}

</style>

즐겨찾기 추가 스크립트

JAVASCRIPT 2015. 7. 18. 18:01 Posted by Dayis

<script type="text/javascript"> 

function bookmarksite(title,url) { 

var agent = navigator.userAgent.toLowerCase();


if((navigator.appName == 'Netscape' && navigator.userAgent.search('Trident') != -1) || (agent.indexOf("msie") != -1)) {

window.external.AddFavorite(url, title); 

} else if (window.chrome) {

alert("Ctrl+D키를 누르시면 즐겨찾기에 추가하실 수 있습니다.");

} else if (window.sidebar) {

window.sidebar.addPanel(title, url, ""); 

} else if(window.opera && window.print) {

var elem = document.createElement('a'); 

elem.setAttribute('href',url); 

elem.setAttribute('title',title); 

elem.setAttribute('rel','sidebar'); 

elem.click(); 

}

</script>


<a href="javascript:bookmarksite('사이트이름', '사이트URL')">즐겨찾기</a>


'JAVASCRIPT' 카테고리의 다른 글

마우스 클릭 위치 좌표값  (0) 2015.08.21
Datepicker 설정  (0) 2015.07.23
입력폼에서 엔터키를 눌렀을 때..  (0) 2015.07.12
숫자만 입력  (0) 2015.03.16
유튜브(Youtube) 동영상 로드, 종료 이벤트 API  (0) 2015.01.13

년월의 마지막 날짜(일) 구하기

ASP 2015. 7. 18. 14:36 Posted by Dayis

Function Get_Lastday(nYear, nMonth)

    Get_Lastday = Day(DateSerial(nYear, nMonth + 1, 1 - 1))

End Function

'ASP' 카테고리의 다른 글

ASP 달력 Calendar  (0) 2015.09.23
ASP 쿠키 로그인/로그아웃  (0) 2015.07.21
ASP 이미지 가로, 세로 크기 구하기  (0) 2015.01.19
페이지 초기번호  (0) 2015.01.04
ASP 문자열에서 HTML 제거 함수  (0) 2015.01.02

입력폼에서 엔터키를 눌렀을 때..

JAVASCRIPT 2015. 7. 12. 21:11 Posted by Dayis

<input type="text" name="searchWord" value="" size="25" value=태그인넷 tagin.net 
onKeyDown="javascript:if (event.keyCode == 13) search_check();"> 
->search_check 함수 실행

<input type="text" name="searchWord" value="" size="25" value=태그인넷 tagin.net 
onKeyDown="javascript:if (event.keyCode == 13) return false;">
->아무것도 실행안되게 하기.. 엔터키쳐도 무반응

13은 엔터키의 키코드값입니다.

'JAVASCRIPT' 카테고리의 다른 글

Datepicker 설정  (0) 2015.07.23
즐겨찾기 추가 스크립트  (0) 2015.07.18
숫자만 입력  (0) 2015.03.16
유튜브(Youtube) 동영상 로드, 종료 이벤트 API  (0) 2015.01.13
jquery 이미지 슬라이드  (0) 2014.12.25

숫자만 입력

JAVASCRIPT 2015. 3. 16. 17:58 Posted by Dayis
<!doctype html>
<html lang="ko">
<head>
    <meta charset="UTF-8">
    <title>input 필드에 오직 숫자만 입력 받기</title>
</head>
<body>
    <h1>input 필드에 오직 숫자만 입력 받기</h1>
    <form>
        <p><input type="text" onkeydown='return onlyNumber(event)' onkeyup='removeChar(event)' style='ime-mode:disabled;'></p>
    </form>
    <script>
        function onlyNumber(event){
            event = event || window.event;
            var keyID = (event.which) ? event.which : event.keyCode;
            if ( (keyID >= 48 && keyID <= 57) || (keyID >= 96 && keyID <= 105) || keyID == 8 || keyID == 46 || keyID == 37 || keyID == 39 )
                return;
            else
                return false;
        }
        function removeChar(event) {
            event = event || window.event;
            var keyID = (event.which) ? event.which : event.keyCode;
            if ( keyID == 8 || keyID == 46 || keyID == 37 || keyID == 39 )
                return;
            else
                event.target.value = event.target.value.replace(/[^0-9]/g, "");
        }
    </script>
</body>
</html>

원본 : http://webskills.kr/archives/310


'JAVASCRIPT' 카테고리의 다른 글

즐겨찾기 추가 스크립트  (0) 2015.07.18
입력폼에서 엔터키를 눌렀을 때..  (0) 2015.07.12
유튜브(Youtube) 동영상 로드, 종료 이벤트 API  (0) 2015.01.13
jquery 이미지 슬라이드  (0) 2014.12.25
jquery 타이머  (0) 2014.12.25

ASP 이미지 가로, 세로 크기 구하기

ASP 2015. 1. 19. 21:47 Posted by Dayis
출처 : http://www.taeyo.pe.kr/Forum/Content.aspx?SEQ=1328&TBL=KNOWHOW&PGN=8
Class ImageClass
	   
	   Private m_Width
	   Private m_Height
	   Private m_ImageType
	   Private BinFile

	   Private BUFFERSIZE
	   Private objStream

	   Private Sub class_initialize()
	   	   	   
	   	   BUFFERSIZE = 65535

	   	   ' Set all properties to default values
	   	   m_Width	   = 0
	   	   m_Height	   = 0
	   	   m_Depth	   = 0
	   	   m_ImageType = Null

	   	   Set objStream = Server.CreateObject("ADODB.Stream")

	   End Sub

	   Private Sub class_terminate()

	   	   Set objStream = Nothing

	   End Sub

	   Public Property Get Width()
	   	   Width = m_Width
	   End Property

	   Public Property Get Height()
	   	   Height = m_Height
	   End Property

	   Public Property Get ImageType()
	   	   ImageType = m_ImageType
	   End Property
	   
	   Private Function Mult(lsb, msb)
	   	   Mult = lsb + (msb * CLng(256))
	   End Function

	   Private Function BinToAsc(ipos)
	   	   BinToAsc = AscB(MidB(BinFile, (ipos+1), 1))	   
	   End Function 
	   
	   Public Sub LoadFilePath(strPath)
	   	   If InStr(strPath, ":") = 0 Then 
	   	   	   strPath = Server.MapPath(strPath)
	   	   End If 
	   	   
	   	   objStream.Open
	   	   objStream.LoadFromFile(strPath)
	   	   BinFile = objStream.ReadText(-1)

	   End Sub 

	   Public Sub LoadBinary(BinaryFile)

	   	   BinFile = BinaryFile
	   	   
	   End Sub 
	   	   
	   Public Sub ImageRead
	   	   
	   	   If  BinToAsc(0) = 137 And BinToAsc(1) = 80 And BinToAsc(2) = 78 Then
	   	   	   ' this is a PNG file
	   	   	   m_ImageType = "png"

	   	   	   ' get bit depth
	   	   	   Select Case BinToAsc(25)
	   	   	   	   Case 0
	   	   	   	   ' greyscale
	   	   	   	   	   Depth = BinToAsc(24)
	   	   	   	   Case 2
	   	   	   	   ' RGB encoded
	   	   	   	   	   Depth = BinToAsc(24) * 3
	   	   	   	   Case 3
	   	   	   	   ' Palette based, 8 bpp
	   	   	   	   	   Depth = 8
	   	   	   	   Case 4
	   	   	   	   ' greyscale with alpha
	   	   	   	   	   Depth = BinToAsc(24) * 2
	   	   	   	   Case 6
	   	   	   	   ' RGB encoded with alpha
	   	   	   	   	   Depth = BinToAsc(24) * 4
	   	   	   	   Case Else	   
	   	   	   	   ' This value is outside of it's normal range, so we'll assume that this is not a valid file
	   	   	   	   	   m_ImageType = Null
	   	   	   End Select

	   	   	   If not IsNull(m_ImageType) Then
	   	   	   	   ' if the image is valid then
        
	   	   	   	   ' get the width
	   	   	   	   m_Width = Mult(BinToAsc(19), BinToAsc(18))
           
	   	   	   	   ' get the height
	   	   	   	   m_Height = Mult(BinToAsc(23), BinToAsc(22))
	   	   	   End If
	   	   End If 

	   	   If BinToAsc(0) = 71 And BinToAsc(1) = 73 And BinToAsc(2) = 70 Then
	   	   	   ' this is a GIF file
	   	   	   m_ImageType = "gif"
        
	   	   	   ' get the width
	   	   	   m_Width = Mult(BinToAsc(6), BinToAsc(7))
        
	   	   	   ' get the height
	   	   	   m_Height = Mult(BinToAsc(8), BinToAsc(9))
        
	   	   	   ' get bit depth
	   	   	   m_Depth = (BinToAsc(10) And 7) + 1
	   	   End If
    
	   	   If BinToAsc(0) = 66 And BinToAsc(1) = 77 Then
	   	   	   ' this is a BMP file
    
	   	   	   m_ImageType = "bmp"
        
	   	   	   ' get the width
	   	   	   m_Width = Mult(BinToAsc(18), BinToAsc(19))
	           
	                   	    ' get the height
	   	   	   m_Height = Mult(BinToAsc(22), BinToAsc(23))
        
	   	   	   ' get bit depth
	   	   	   m_Depth = BinToAsc(28)
	   	   End If
	   
	   
	   	   If IsNull(m_ImageType) Then
	   	   	   ' if the file is not one of the above type then
	   	   	   ' check to see if it is a JPEG file
	   	   	   Dim lPos : lPos = 0
	   	   	   	   	   	   	   	   
	   	   	   Do
	   	   	   	   ' loop through looking for the byte sequence FF,D8,FF
	   	   	   	   ' which marks the begining of a JPEG file
	   	   	   	   ' lPos will be left at the postion of the start
	   	   	   	   If (BinToAsc(lPos) = &HFF And BinToAsc(lPos + 1) = &HD8 _  
	   	   	   	   	    And BinToAsc(lPos + 2) = &HFF) _
	   	   	   	   	    Or (lPos >= BUFFERSIZE - 10) Then Exit Do
	   	   	   	   
	   	   	   	   	   ' move our pointer up
	   	   	   	   	   lPos = lPos + 1
	   	   	   	   
	   	   	   	   	   ' and continue
	   	   	   Loop
	   	   	   	   
	   	   	   lPos = lPos + 2
	   	   	   If lPos >= BUFFERSIZE - 10 Then Exit Sub
	   	   	   
	   	   	   
	   	   	   Do
	   	   	   	   ' loop through the markers until we find the one 
	   	   	   	   ' starting with FF,C0 which is the block containing the 
	   	   	   	   ' image information
	   	   	   	   
	   	   	   	   Do
	   	   	   	   	   ' loop until we find the beginning of the next marker
	   	   	   	   	   If BinToAsc(lPos) = &HFF And BinToAsc(lPos + 1) _
	   	   	   	   	   	   <> &HFF Then Exit Do
	   	   	   	   	   	   lPos = lPos + 1
	   	   	   	   	   	   If lPos >= BUFFERSIZE - 10 Then Exit Sub
	   	   	   	   Loop
	   	   	   	   
	   	   	   	   ' move pointer up
	   	   	   	   lPos = lPos + 1
	   	   	   	   
	   	   	   	   If  (BinToAsc(lPos) >= &HC0 And BinToAsc(lPos) <= &HC3) Or _
	   	   	   	   (BinToAsc(lPos) >= &HC5 And BinToAsc(lPos) <= &HC7) Or _
	   	   	   	   (BinToAsc(lPos) >= &HC9 And BinToAsc(lPos) <= &HCB) Or _
	   	   	   	   (BinToAsc(lPos) >= &HCD And BinToAsc(lPos) <= &HCF) Then
	   	   	   	   	   Exit Do 
	   	   	   	   End If 

	   	   	   	   ' otherwise keep looking
	   	   	   	   lPos = lPos + Mult(BinToAsc(lPos + 2), BinToAsc(lPos + 1))
	   	   	   	   	   
	   	   	   	   ' check for end of buffer
	   	   	   	   If lPos >= BUFFERSIZE - 10 Then Exit Sub
	   	   	   	   	   
	   	   	   Loop
	   	   	   	   
	   	   	   ' If we've gotten this far it is a JPEG and we are ready
	   	   	   ' to grab the information.
	   	   	   	   
	   	   	   m_ImageType = "jpg"
	   	   	   	   
	   	   	   ' get the height
	   	   	   m_Height = Mult(BinToAsc(lPos + 5), BinToAsc(lPos + 4))
	   	   	   	   
	   	   	   ' get the width
	   	   	   m_Width = Mult(BinToAsc(lPos + 7), BinToAsc(lPos + 6))
	   	   	   	   
	   	   	   ' get the color depth
	   	   	   m_Depth = BinToAsc(lPos + 8) * 8
	   	   	   	   
	   	   End If
	   End Sub 
	   
End Class 

사용법입니다.

Dim Image
Set Image = new ImageClass
With Image
	   .LoadFilePath("가상경로 or 물리적 경로 어떤것을 입력하던 관계없습니다.")
	   .ImageRead
       iType = .ImageType
       iWidth = .Width
       iHeight = .Height
End With
Set Imaeg = Nothing 

또는...
Dim Image
Set Image = new ImageClass
With Image
	   Image.LoadBinary("바이너리로 읽었을때...")
	   .ImageRead
       iType = .ImageType
       iWidth = .Width
       iHeight = .Height
End With
Set Imaeg = Nothing 


'ASP' 카테고리의 다른 글

ASP 쿠키 로그인/로그아웃  (0) 2015.07.21
년월의 마지막 날짜(일) 구하기  (0) 2015.07.18
페이지 초기번호  (0) 2015.01.04
ASP 문자열에서 HTML 제거 함수  (0) 2015.01.02
ASP utf-8  (0) 2014.12.17

<div id="player"></div>

<script src="http://www.youtube.com/player_api"></script>

<script>

// Create youtube player

var player;


// videoId : 공유URL(http://youtu.be/UaY9xbHmVAc)에서 'http://youtu.be'만 제거한 아이디

// playerVars : autoplay-자동시작, controls-하단컨트롤 사용여부, html5-html5 사용여부

function onYouTubePlayerAPIReady() {

player = new YT.Player('player', {

height: '480',

width: '853',

videoId: 'UaY9xbHmVAc',

playerVars: { 'autoplay': 1, 'controls': 1, 'html5': 1 },

events: {

'onReady': onPlayerReady,

'onStateChange': onPlayerStateChange

}

});

}


// autoplay video

function onPlayerReady(event) {

//동영상 로드가 끝난 후 이벤트 

alert("동영상 로드");

}


// when video ends

function onPlayerStateChange(event) {        

if(event.data === 0) {

//동영상 끝난 후 이벤트 

alert("영상 끝");

}

}

</script>

'JAVASCRIPT' 카테고리의 다른 글

입력폼에서 엔터키를 눌렀을 때..  (0) 2015.07.12
숫자만 입력  (0) 2015.03.16
jquery 이미지 슬라이드  (0) 2014.12.25
jquery 타이머  (0) 2014.12.25
[jQuery] window와 document 비교  (0) 2013.07.09