본문 바로가기

반응형

웹프로그래밍

(130)
HTML5 오디오태그 <audio></audio> 오디오 태그는 웹브라우저에서 플러그인의 도움 없이 음악을 재생할 수 있게 만들어주는 HTML5 태그 이다. HTML5에서 추가된 기능이므로 IE8 이하에서는 사용할 수 없다. audio 태그의 속성 속성 이름 값 설명 src URL 음악파일의 경로지정 controls "controls", "" , - 음악 재생 도구를 출력할지 지정 autoplay "autoplay", "", - 음악을 자동 재생할지 지정 loop "loop", "", - 음악을 반복할지 지정 preload "none", "metadata", "auto" 음악을 재생하기 전에 모두 불러올지 지정 none : 사용자가 오디오를 필요로하지 않을 것이라고 명시, 미리 다운로드 하지 않음 metadata : 사용자가 오디오를 필요로 하지 않을 ..
Javascript 모바일 체크 var mobilecheck = function() { var check = false; (function(a){if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(a)||/1207|63..
Javascript Favicon 적용 (function() { var link = document.createElement('link'); link.type = 'image/x-icon'; link.rel = 'shortcut icon'; link.href = '/resources/pubtree/images/favicon.ico'; document.getElementsByTagName('head')[0].appendChild(link); }());
input type=text 에서 엔터 눌렀을때 submit 실행 1. onkeydown="javascript: if (event.keyCode == 13) {chkform();}" 이런식으로 체크한다. 함수 호출로 chkform(); view source print? 01.function chkform() 02.{ 03.var f = document.fo_search; 04.if(f.addr1.value == '') 05.{ 06. alert('지역을 선택해주세요.'); 07. f.addr1.focus(); 08. return false; 09.}else{ 10. document.fo_search.submit(); 11.} 12.} document.fo_search.submit(); 이런식으로 form의 submit 실행
How to Enable CSS3 Border Radius in Internet Explorer 8 and below CSS3 gives us the ability to create rounded corners with the border-radius property. But as you might already know, this new feature is not recognized in Internet Explorer 8 (IE8) and its earlier versions. So when you apply CSS3 Border Radius to an element, it still appears as a box with pointed tips. You may find a lot of different advice on the Internet suggesting you ignore IE8. You wish you ..
Conditional comments with IE Conditional comments with IE Since Internet Explorer 5, conditional comments have been used to show or hide extra content from Internet Explorer. The syntax The example below will add a CSS style sheet only if the browser viewing the page is IE6: Any HTML that appears between the IF statement will be added to the document if viewed using the specified version of Internet Explorer. You can use th..
[php] 파일 이동, 복사 함수 php에서는 copy함수를 이용하여 간단하게 파일을 복사하거나 unlink(또는 delete)함수로 파일을 삭제할 수 있습니다. 이 두 함수는 복사, 삭제에 성공할 경우 true를, 실패하면 오류 코드 메시지를 표시하므로 함수 앞에 @를 붙여 보안 유효성을 높여 주도록 합니다. bool copy ( string $source , string $dest [, resource $context ] ) (PHP 4, PHP 5) copy(원본 파일명, 복사 파일명); unlink(삭제 파일명); 대상 파일이 이미 존재하면 덮어 쓰는 점에 주의가 필요합니다. 다음은 파일 복사 예제입니다. 예제 (ex #1 다음은 파일 이동 예제입니다. 예제 (ex #2 단순히 파일이름만 변경 원할 경우 rename함수를 이용하면..
PHP + jQuery AJAX Upload 1. input file tag on event $('#tmp_widget_file').on('change', prepareUpload); function prepareUpload(event){files = event.target.files} $('#twf').on('submit', uploadFiles); 2. uploadFiles function function uploadFiles(event){ event.stopPropagation(); event.preventDefault(); var data = new FormData(); $.each(files, function(key, value){ data.append(key, value); }); $.ajax({ url: './page/getWidget..

반응형